pugixml.pugi.FileWriter¶
- class pugixml.pugi.FileWriter
Bases:
XMLWriter
(pugixml-python only)
XMLWriter
implementation for a file.- Raises:
OSError – When a file fails to open or write.
See also
Examples
>>> from contextlib import closing >>> from pugixml import pugi >>> doc = pugi.XMLDocument() >>> doc.load_string('<node><child>\U0001f308</child></node>') >>> with closing(pugi.FileWriter('tree.xml')) as writer: ... doc.save(writer)
Members: