[jdom-interest] Re: Problem while validating
hans.prueller at igs.at
Tue Dec 18 00:03:01 PST 2001
regarding to validation errors on valid files, I think this isn't a jdom
a problem of the xml-parser behind.
I've got a similar problem on validating xml-files against schemas:
Like Pierre's situation, the files are validated as correct by XMLSpy 4.0.1
when parsing the files with a validating SAXBuilder in JDOM, I got
errors (especially with the xsd:any element, ...)
I expect this to be a problem of Xerces 1.4.3 I'm using and hope, this
will be solved in a future release.
What do you think about this??
>I am trying to validate an XML document using :
> SAXBuilder builder = new SAXBuilder(true);
> document = builder.build(new StringReader(xmlDocument));
>I know the DTD is found because if I do not validate, I get an error
>that entities are not declared. However, if I validate, I get no error
>regarding entities, but I get a JDOMException with the message :
>Error on line 1: Element type "document" must be declared.
>("document" is the name of the root element) This seems to indicate that
>root element is not defined. However, it is defined and the file is
>validated without any problem by IE5 or XMetal.
>Any idea ?
More information about the jdom-interest