PyMOTW: Creating XML Documents with ElementTree
Originally posted
· 1 min read
In addition to its parsing capabilities, ElementTree also supports creating well-formed XML documents from Element objects constructed in your application. The Element class used when a document is parsed also knows how to generate a serialized form of its contents, which can then be written to a file or other data stream.