Skip to Content.
Sympa Menu

xom-interest - [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 Interest List <xom-interest AT lists.ibiblio.org>
  • Subject: [XOM-interest] c'tor Builder( org.xml.sax.XMLReader [...] )
  • Date: Sun, 7 Feb 2010 22:33:42 +0100

The documentation for those constructors of nu.xom.Builder that take an
instance of org.xml.sax.XMLReader as first parameter promises that the
resulting builder will read data from the specified parser object.

Not quite true.

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.

* Don't care what parser? Don't supply any.
* Want a specific parser, like Xerces? Supply an implementation class of
XMLReader without setting up any handlers on it.
* Want specific parsing behaviour? Supply your custom XMLFilter wrapping
a stock XMLReader of your choice.

--
Michael Ludwig




Archive powered by MHonArc 2.6.24.

Top of Page