[XOM-interest] Known parsers
Elliotte Harold
elharo at metalab.unc.edu
Thu Jan 8 23:59:55 EST 2009
Wolfgang Hoschek wrote:
> Even though it has no effect on the OOM discussed in another thread,
> I think it would be nice if Builder.setupParser() would recognize
> xerces-2.9.x and the JDK-1.6 xerces flavour by adding the following
> to the list of its known parsers:
>
> "org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser", // xerces-2.9.x
> "com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl
> $JAXPSAXParser", // JDK 1.6
Like so:
// A couple of Xerces specific properties
if (parserName.equals("nu.xom.XML1_0Parser")
|| parserName.equals("nu.xom.JDK15XML1_0Parser")
|| parserName.equals("org.apache.xerces.parsers.SAXParser")
||
parserName.equals("com.sun.org.apache.xerces.internal.parsers.SAXParser")
||
parserName.equals("org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser")
// xerces-2.9.x
||
parserName.equals("com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser"))
// JDK 1.6
{
Done.
--
Elliotte Rusty Harold elharo at metalab.unc.edu
Refactoring HTML Just Published!
http://www.amazon.com/exec/obidos/ISBN=0321503635/ref=nosim/cafeaulaitA
More information about the XOM-interest
mailing list