How to serialize an xml document in Python
sandorlevi at yahoo.com
Thu Mar 20 02:41:04 CET 2003
src = doc.toxml()
antun at antunkarlovac.com (Antun Karlovac) wrote in message news:<faa2f5ac.0303191153.5ba77707 at posting.google.com>...
> This sounds like a REALLY easy question, but for the life of me I
> can't seem to find a solution. I've created an XML document as
> impl = xml.dom.minidom.getDOMImplementation()
> doc = impl.createDocument( None, "element", None )
> And then I added plenty of nodes to it.
> So far I've been printing it out to the console:
> xml.dom.ext.PrettyPrint( doc )
> But now I want to assign the serialized string of the XML to a
> How do I do that?
More information about the Python-list