Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Consider adding Builder.getXMLReader()

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • To: Wolfgang Hoschek <whoschek AT lbl.gov>, xom-interest AT lists.ibiblio.org
  • Cc:
  • Subject: Re: [XOM-interest] Consider adding Builder.getXMLReader()
  • Date: Fri, 3 Oct 2003 13:42:23 -0400

At 10:27 AM -0700 10/3/03, Wolfgang Hoschek wrote:

I still need to find a parser myself and hence duplicate the good and solid code within Builder (findParsers(), setupParser()), that normally takes care of this fragile step. This would be quite a bit easier if Builder had a method

public XMLReader getXMLReader() {
return this.parser;
}

(or perhaps better named getParser()) so that I could get hold of the reader and then customize it afterwards, ala:

builder = new Builder(true);
builder.getXMLReader().setFeature(...);
builder.build(...)


The problem with that is there's no guarantee which parser you'll get. If you're going to use custom SAX features and properties such as http://apache.org/xml/features/validation/schema then I assume you're going to want to provide a parser that is known to support those features and properties.
--

Elliotte Rusty Harold
elharo AT metalab.unc.edu
Processing XML with Java (Addison-Wesley, 2002)
http://www.cafeconleche.org/books/xmljava
http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA




Archive powered by MHonArc 2.6.24.

Top of Page