Re: LexicalHandler for DocumentBuilder?

2009-11-08 Thread Michael Glavassevich
"dbros...@mebigfatguy.com" wrote on 11/08/2009 08:21:21 PM: > Thanks for the response. If i understand you correctly, i should do this: > > XMLReader r = XMLReaderFactory.createXMLReader(); > MyXMLFilter filter = new MyXMLFilter(); > filter.setParent(r); > >

Re: LexicalHandler for DocumentBuilder?

2009-11-08 Thread dbros...@mebigfatguy.com
Thanks for the response. If i understand you correctly, i should do this: XMLReader r = XMLReaderFactory.createXMLReader(); MyXMLFilter filter = new MyXMLFilter(); filter.setParent(r); DocumentBuilderFactory dbf = DocumentBuilderFactory.newI

Re: LexicalHandler for DocumentBuilder?

2009-11-08 Thread Michael Glavassevich
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 t

LexicalHandler for DocumentBuilder?

2009-11-08 Thread dbros...@mebigfatguy.com
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