[jdom-interest] DTD problem

Cagan Senturk cagan at skyscout.com
Mon Nov 20 15:15:21 PST 2000


I am having a weird problem reading in a very simple xml file with a very
basic dtd using a SAXBuilder (validation on, default Xerces parser).

The error message I get is the following:

org.jdom.JDOMException: Document root element "skyscout", must match DOCTYPE
root "skyscout".: Error on line 3 of document
http://localhost:7700/test.xml: Document root element "skyscout", must match
DOCTYPE root "skyscout".

It's being generated by SAXBuilder.java (line 310).

When I use the DOMBuilder, there are no problems.



Here is the content of the test.xml file:
<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE skyscout SYSTEM "http://localhost:7700/test.dtd">

<skyscout>

<folder id="MySkyScout">

<parent/>

<title>My SkyScout</title>

</folder>

</skyscout>



and the test.dtd contains:

<?xml version='1.0' encoding='UTF-8'?>

<!ELEMENT skyscout (folder+)>

<!ELEMENT folder (#PCDATA)>



Thanks in advance for any help,

Cagan
cagan at skyscout.com
www.skyscout.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20001120/3875fb25/attachment.htm


More information about the jdom-interest mailing list