This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients ajaksu2, akuchling, damien, exarkun, loewis, pboddie, vdupras
Date 2009-02-03.23:12:07
SpamBayes Score 3.6073118e-07
Marked as misclassified No
Message-id <>
In-reply-to <>
> Where in the following sequence am I supposed to receive the document 
> locator?
> parser = xml.sax.make_parser()
> parser.setEntityResolver(CachingEntityResolver())
> doc = xml.dom.minidom.parse('file.xml', parser)

This is DOM parsing, not SAX parsing.

> The content handler is being created deep inside xml.dom.  It does, in 
> fact, store the document locator, but not in any place that I can easily 
> access without breaking several layers of abstraction.

So break layers of abstraction, then. Or else, use dom.expatbuilder,
and ignore SAX/pulldom for DOM parsing.

> Or, as a more general question: How can I get a DOM tree that includes 
> external entities?  If there's an easy way to do it, the documentation 
> does not make it clear at all.

This tracker is really not the place to ask questions; use python-list
for that.
Date User Action Args
2009-02-03 23:12:09loewissetrecipients: + loewis, akuchling, pboddie, exarkun, ajaksu2, vdupras, damien
2009-02-03 23:12:08loewislinkissue2124 messages
2009-02-03 23:12:07loewiscreate