Message81114
> 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:09 | loewis | set | recipients:
+ loewis, akuchling, pboddie, exarkun, ajaksu2, vdupras, damien |
2009-02-03 23:12:08 | loewis | link | issue2124 messages |
2009-02-03 23:12:07 | loewis | create | |
|