[XML-SIG] Preserving XML and DocType declaration attributes using DOM
Tue, 19 Mar 2002 17:18:32 -0500
On Tue, Mar 19, 2002 at 09:36:51PM +0100, Martin v. Loewis wrote:
> Dinu Gherman <email@example.com> writes:
> > Hi, I have something like the DOM code below, where I don't succedd in
> > getting at the doctype attributes. I'm trying to read an XML file with
> > DOM, manipulate it and save it to a new file... The PrettyPrint function
> > seems not to preserve the attributes of the XML and doctype declarations.
> > Is there some other canonical way of doing this, maybe? Or is it an
> > issue with the Python 2.2 and PyXML 0.7 I'm using?
> To my knowledge, the DOM, as specified, does not support this kind of
> operation (atleast not in DOM level 2). Neither does any of the Python
> DOM implementations provide this as an extension.
libxml2 preserves those informations, the python bindings don't
provide DOM in a strict sense but provide an equivalent (larger)
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
firstname.lastname@example.org | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/