Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] c'tor Builder( org.xml.sax.XMLReader [...] )

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Michael Ludwig <milu71 AT gmx.de>
  • To: XOM API for Processing XML with Java <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] c'tor Builder( org.xml.sax.XMLReader [...] )
  • Date: Mon, 8 Feb 2010 22:14:58 +0100

Elliotte Rusty Harold schrieb am 08.02.2010 um 06:26:30 (-0500):
> On Sun, Feb 7, 2010 at 4:33 PM, Michael Ludwig <milu71 AT gmx.de> wrote:
>
> > Maybe the documentation should reflect the fact that XOM will
> > replace an existing ContentHandler and put its own ContentHandler
> > in place. So if the user wants to control the parsing process, he
> > should supply an XMLFilter, not an XMLReader.
>
> Looking closer I think this qualifies as a misunderstanding. XOM only
> promises to use the parser. It never promises to use the supplied
> ContentHandler on that parser.

True. That was my misunderstanding.

> I'm open to suggested changes in the wording though.

Maybe a short addition:

"Note that if you want to filter the SAX event stream which the XOM
document will be built from, you have to supply an XMLFilter instead
of a plain XMLReader with a content handler in place as XOM will
replace any existing content handler by its own content handler."

This is how SAX is supposed to be used anyway, but having used it very
little, I had forgotten about this detail. Now that I remember, I know
that using the parser is not the same as using the content handler.
But maybe others could benefit from more clear-cut wording as well.

--
Michael Ludwig




Archive powered by MHonArc 2.6.24.

Top of Page