[jdom-interest] Validation using XML Schema

Christophe D. Laprun chris.laprun at nist.gov
Tue Aug 22 09:35:52 PDT 2000


Hi all,

I haven't since an answer to this question and I ran into the same
problem. I am using a version of JDOM build from CVS at the end of last
week.
What am I doing wrong ?

Chris

Werner Guttmann wrote:
> 
> Hi,
> 
> 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
> reported.
> 
> Can anybody please indicate what's wrong here, and whether this has
> already been resolved in the current cvs tree ?
> 
> Regards
> Werner Guttmann

-- 
Christophe Laprun    [Ingenieur ISIMA, France / Guest researcher @NIST]
web: http://www.nist.gov/speech/staff/laprunch.htm
email: chris.laprun at nist.gov
phone: (301) 975 3191             fax: (301) 670 0939
--
The universe seems neither benign nor hostile, merely indifferent -
Sagan



More information about the jdom-interest mailing list