[XML-SIG] Accessing internal entities with minidom or 4DOM

Martin v. Loewis martin@v.loewis.de
22 Jul 2002 07:10:03 +0200


"Phil Glaser" <StillSmallVoice@DirectvInternet.com> writes:

> The only documentation I could find for 4DOM
> (http://pyxml.sourceforge.net/topics/howto/section-DOM.html) did not give
> any details about how to access the internal subset, but doc.childNodes
> would appear to indicate that it's not seeing any entities. (If there's more
> documentation anywhere please let me know.)

I recommend that you read the DOM spec, at

http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html

Notice that there is no programmatic way to set the entities member of
a DocumentType node, so an XML parser would need a private interface
to the DOM implementation to set this member to a non-trivial value.

In short, that aspect of the DOM is not implemented in any of the
Python DOM implementations. In addition to the problems with the DOM
API itself, there is also the problem that the underlying XML parser
don't report the internal subset in a meaningful way.

Contributions are welcome.

Regards,
Martin