Writing XML from Python ...
Fred L. Drake, Jr.
fdrake at acm.org
Thu Aug 19 14:48:51 EDT 1999
Gerald Gutierrez writes:
> I've been having an extremely hard time finding information on how I
> can write out XML files from Python. The python-xml software seems to
> be targetted primarily at parsing XML files, not creating them.
If you create DOM objects using the XML package (which can be done
programmatically without a source document), you can simply write the
string returned by the document object's toxml() method.
If you don't want to use the XML package, print works just fine.
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
Corporation for National Research Initiatives
More information about the Python-list
mailing list