[XML-SIG] preserving doctype declaration with xml.dom?
Fred L. Drake, Jr.
fdrake@acm.org
Mon, 23 Sep 2002 14:53:09 -0400
Martin v. Loewis writes:
> That is not surprising; none of the DOM implementations preserves this
> information. If you need the functionality, you are encouraged to
> research this issue, and propose fixes; please expect this to be very
> difficult.
Just a late followup now that PyXML 0.8.1 is out: Using PyXML 0.8.1
and the minidom, you should be able to get a meaningful XML and
DOCTYPE declarations back out if you use the parse() or parseString()
functions from the xml.dom.minidom or xml.dom.expatbuilder modules, or
the DOM Level 3 (draft) Load/Save interfaces on the DOMImplementation
object returned by xml.dom.minidom.getDOMImplementation().
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at Zope Corporation