<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.00.3103.1000" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=078450523-20112000>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).</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=078450523-20112000></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=078450523-20112000>The error message I
get is the following:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=078450523-20112000></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=078450523-20112000>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". </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=078450523-20112000></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=078450523-20112000>It's being generated
by SAXBuilder.java (line 310).</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=078450523-20112000></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=078450523-20112000>When I use the
DOMBuilder, there are no problems.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=078450523-20112000></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=078450523-20112000></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=078450523-20112000></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=078450523-20112000>Here is the content
of the test.xml file:</SPAN></FONT></DIV>
<DIV><SPAN class=078450523-20112000>
<P><FONT face=Arial size=2><?xml version='1.0'
encoding='UTF-8'?></FONT></P>
<P><FONT face=Arial size=2><!DOCTYPE skyscout SYSTEM "<A
href='http://localhost:7700/test.dtd"'>http://localhost:7700/<SPAN
class=078450523-20112000>test</SPAN>.dtd"</A>> </FONT></P>
<P><FONT face=Arial size=2><skyscout></FONT></P>
<P><FONT face=Arial size=2><folder id="MySkyScout"></FONT></P>
<P><FONT face=Arial size=2><parent/></FONT></P>
<P><FONT face=Arial size=2><title>My SkyScout</title></FONT></P>
<P><FONT face=Arial size=2></folder></FONT></P>
<P><FONT face=Arial size=2></skyscout></FONT></P>
<P> </P>
<P><FONT face=Arial size=2><SPAN class=078450523-20112000>and the test.dtd
contains:</SPAN></FONT></P><SPAN class=078450523-20112000>
<P><FONT face=Arial size=2><?xml version='1.0'
encoding='UTF-8'?></FONT></P>
<P><FONT face=Arial size=2><!ELEMENT skyscout (folder+)></FONT></P>
<P><FONT face=Arial size=2><!ELEMENT folder (#PCDATA)></FONT></P>
<P> </P>
<P><FONT face=Arial size=2><SPAN class=078450523-20112000>Thanks in advance for
any help,</SPAN></FONT></P></SPAN></SPAN></DIV>
<P><FONT face=Arial size=2>Cagan</FONT> <BR><FONT face=Arial
size=2>cagan@skyscout.com</FONT> <BR><FONT face=Arial
size=2>www.skyscout.com</FONT> </P>
<DIV> </DIV></BODY></HTML>