Hi,

You're making assumptions about the implementation which aren't required
and certainly aren't true for Xerces. There is no underlying SAX parser.
The DOM is built from XNI events. You cannot plug SAX handlers into it.

If you want to build a SAX filter for replacing skipped entities [1] and
then build a DOM from that, you could try using the Transformer API instead
(i.e. javax.xml.transform.Transformer.transform(SAXSource, DOMResult))
where the SAXSource contains your XMLFilter [2] which does this resolution.

Thanks.

[1]
http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/ContentHandler.html#skippedEntity
(java.lang.String)
[2]
http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/XMLFilter.html.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrgla...@ca.ibm.com
E-mail: mrgla...@apache.org

"dbros...@mebigfatguy.com" <dbros...@mebigfatguy.com> wrote on 11/08/2009
12:52:53 PM:

> I want to be able to resolve unknown entities while using
> DocumentBuilder.parse. I see sax has a LexicalHandler for this purpose,
> and i'd assume that there's some way to tell DOM to pass a handler into
> the underlying sax parser that builds the dom, but i haven't found it.
> Could someone point me in the right direction?
>
> thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
> For additional commands, e-mail: j-users-h...@xerces.apache.org

Reply via email to