M
myexciteac
I'm attempting to validate an XML document against a Schema using
Xerces. Using JDOM (1.0) under Java 1.4 this was accomplished as
follows:
myBuilder = new
SAXBuilder("org.apache.xerces.parsers.SAXParser",true);
myBuilder.setFeature("http://apache.org/xml/features/validation/schema",true);
myParsedXmlDoc = myBuilder.build(xmlFile);
Since Java 1.4 uses Crimson as the default XML parser, I had to
reference the Xerces JAR files in the classpath. Our requirements now
require us to use Java 1.5 as the JVM - no problem, Java 1.5 includes
Xerces as the default XML parser. Unfortunately, I am getting a
"org.jdom.input.JDOMParseException" error when attempting to
validate using Java 1.5. I'm intentionally not including Xerces JAR
files in the classpath since 1.5 already includes Xerces. What am I
doing wrong? Can someone show me how to do this using JDOM and Java
1.5?
Xerces. Using JDOM (1.0) under Java 1.4 this was accomplished as
follows:
myBuilder = new
SAXBuilder("org.apache.xerces.parsers.SAXParser",true);
myBuilder.setFeature("http://apache.org/xml/features/validation/schema",true);
myParsedXmlDoc = myBuilder.build(xmlFile);
Since Java 1.4 uses Crimson as the default XML parser, I had to
reference the Xerces JAR files in the classpath. Our requirements now
require us to use Java 1.5 as the JVM - no problem, Java 1.5 includes
Xerces as the default XML parser. Unfortunately, I am getting a
"org.jdom.input.JDOMParseException" error when attempting to
validate using Java 1.5. I'm intentionally not including Xerces JAR
files in the classpath since 1.5 already includes Xerces. What am I
doing wrong? Can someone show me how to do this using JDOM and Java
1.5?