[jdom-interest] Problem while validating

pys at volgadif.com pys at volgadif.com
Mon Dec 17 15:51:49 PST 2001


Hi !

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 saying
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 the
root element is not defined. However, it is defined and the file is
validated without any problem by IE5 or XMetal.

Any idea ?

Pierre-Yves





More information about the jdom-interest mailing list