[jdom-interest] Feature Request
Jeremy.Prellwitz at siras.com
Jeremy.Prellwitz at siras.com
Thu Feb 19 18:56:42 PST 2004
This sounds like a good description of the problem. Because i'm using
NekoHTML to parse HTML documents, and in the same webapp, i also need to
parse XML documents.
To clarify, i do have a work around, and that is to set a Java runtime
system property. Its just not a clean solution, and I think offering a way
to pass in an XMLReader class that can be instantiated with the
StandardParserConfiguration class would be a good way to go.
-jeremy
Elliotte Rusty
Harold
<elharo at metalab.u To
nc.edu> "Chris B." <chris at tech.com.au>
cc
02/19/2004 06:26 Jeremy.Prellwitz at siras.com,
PM jdom-interest at jdom.org
Subject
Re: [jdom-interest] Feature Request
At 11:40 AM +1100 2/20/04, Chris B. wrote:
>Nekohtml has some information on making it play nice with other parsers.
>
>I'm not an expert on the internals of sax etc, but wouldn't the
>Right Thing (tm) for have been for NekoHtml to have provided an
>XMLReader implementation, which could then be plugged into JDOM?
>
>
The problem here is a design flaw in Xerces. It assumes you will only
ever want one parser configuration in the same VM. (This is not an
XMLReader. This is an internal, non-standard class in Xerces.) Thus
once the parser configuration has been set through the appropriate
system property or default, you're stuck with it for all your Xerces
parsing. Possibly you could change the system property in your code,
but I'm not sure whether that would work or not.
--
Elliotte Rusty Harold
elharo at metalab.unc.edu
Effective XML (Addison-Wesley, 2003)
http://www.cafeconleche.org/books/effectivexml
http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA
More information about the jdom-interest
mailing list