<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2722" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=786293707-02092005><FONT face=Arial
color=#0000ff size=2>Yes: if you want an XML parser to process your file, then
the file must be well-formed XML. That means that if it contains any entity
references, there must be a declaration of those entities (so there must
be a DTD).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=786293707-02092005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=786293707-02092005><FONT face=Arial
color=#0000ff size=2>You can probably preprocess your file to turn it into
well-formed XML by adding the DTD before parsing.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=786293707-02092005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=786293707-02092005><FONT face=Arial
color=#0000ff size=2>Michael Kay</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=786293707-02092005><FONT face=Arial
color=#0000ff size=2><A
href="http://www.saxonica.com/">http://www.saxonica.com/</A></FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> jdom-interest-bounces@jdom.org
[mailto:jdom-interest-bounces@jdom.org] <B>On Behalf Of </B>Vish
D.<BR><B>Sent:</B> 01 September 2005 16:41<BR><B>To:</B>
jdom-interest@jdom.org<BR><B>Subject:</B> Re: [jdom-interest] Resolving
Entities...when no DTD is assigned(notDOCTYPE declaration) in
XML<BR></FONT><BR></DIV>
<DIV></DIV>So, in order for SAXBuilder to correctly parse/build a XML file,
the XML file must contain DOCTYPE declaration? <BR><BR><BR>
<DIV><SPAN class=gmail_quote>On 8/31/05, <B class=gmail_sendername>Michael
Kay</B> <<A href="mailto:mike@saxonica.com">mike@saxonica.com</A>>
wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><SPAN
class=q>
<DIV dir=ltr align=left>I am having some trouble figuring out how to go
about resolving entities when an XML file doesn't have DOCTYPE declaration
(no DTD attached to it), but contains entities that are 'non-standarad'
(such as, '&nbsp;', etc...). <SPAN><FONT face=Arial color=#0000ff
size=2> </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV></SPAN>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>I don't
think such a file can correctly be described as an XML
file.</FONT></SPAN></DIV><SPAN class=sg>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>Michael
Kay</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="http://www.saxonica.com/"
target=_blank>http://www.saxonica.com/</A></FONT></SPAN>
</DIV></SPAN></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>