[jdom-interest] Validation using XML Schema

Werner Guttmann Werner.Guttmann at msdw.com
Thu Jul 27 08:50:42 PDT 2000


I am currently using jdom-b4.jar (since I can't get beyond a firewall
here at work), and I am experiencing a bit of a problem with validating
xml documents against a schema definition.

Running such a xml document through the following code ...

File file = new File (args[0]);

SAXBuilder builder = new SAXBuilder (true);
Document doc = builder.build (file)

results into the below JDOMException being thrown ...

org.jdom.JDOMException: Element type "MarginRequest" must be declared

If I run the same xml file through a validating sax parser from the
xerces-j-1.1.3 distribution, everything is fine, i.e. no problems are

Can anybody please indicate what's wrong here, and whether this has
already been resolved in the current cvs tree ?

Werner Guttmann

More information about the jdom-interest mailing list