Name
writexml
Synopsis
n
.writexml(file
)
Writes the XML source for the subtree rooted at
n
to file-like object
file
, open for writing. Note that
file
.write
must accept
Unicode strings (as covered in Section 9.6.1), unless
all text in the XML source produced can be converted implicitly to
plain strings using the current default encoding (normally
'ascii
').
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.