| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
xmlfile
xmlfile(self, output_file, encoding=None, compression=None)
A simple mechanism for incremental XML serialisation.
Usage example:
with xmlfile("somefile.xml", encoding='utf-8') as xf:
xf.write_declaration(standalone=True)
xf.write_doctype('<!DOCTYPE root SYSTEM "some.dtd">')
# generate an element (the root element)
with xf.element('root'):
# write a complete Element into the open root element
xf.write(etree.Element('test'))
# generate and write more Elements, e.g. through iterparse
for element in generate_some_elements():
# serialise generated elements into the XML file
xf.write(element)
|
|||
|
|||
|
|||
|
|||
| a new object with type S, a subtype of T |
|
||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
|
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Fri Apr 18 08:58:41 2014 | http://epydoc.sourceforge.net |