[jdom-interest] How to: allow-java-encodings

Fred Clewis clewisf at us.ibm.com
Tue Nov 6 12:09:28 PST 2001


Alex,

I still can't figure out how to allow-java-encodings.

I know if I were just in Xerces I could do:
----------------------------------
SAXParser p=new SAXParser();
try {
  p.setFeature("http://xml.org/sax/features/allow-java-encodings", true);
} catch (SAXException e) {
  System.out.println("error in setting up parser feature");
}
------------------------------------
but how do I get JDOM to use that altered parser in code like:
-----------------------------------
SAXBuilder builder = new SAXBuilder();
------------------------------------
I don't think that is what SAXBuilder(String saxDriverClass) is for is it?
Are "features" Class variables that are set for all instances?

thanks,

>(2) It's called something like "http://.../allow-java-encodings". Check
the
>"features" list of Xerces. When reading in an XML file, JDOM relies on
>whatever the underlying parser does. So if the underlying parser is
Xerces,
>and you set this feature, then it should work fine.




More information about the jdom-interest mailing list