prga.xml module¶
XML streaming generation.
-
class
prga.xml.XMLGenerator(ostream, pretty=False, skip_stringify=False)¶ Bases:
objectA XML Generator based on lxml.etree.
Parameters: - ostream (file-like object) – the output stream
- pretty (
bool) – if the output XML should be nicely broken into multiple lines and indented - skip_stringify (
bool) – assumes the dict passed intoelementandelement_leafare already converted to string objects
-
_XMLGenerator__XMLElementContextManager¶ alias of
XMLGenerator.__XMLElementContextManager
-
_indent()¶
-
_newline()¶
-
_stringify(d)¶
-
element(tag, attrs=None)¶
-
element_leaf(tag, attrs=None, text='')¶