Hello all,<br>
<br>
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...). I need to do this in such a way that I don't
change the XML file (without added DOCTYPE declaration, etc..).<br>
<br>
My need for the above is as follows:<br>
<br>
SAXBuilder builder = new SAXBuilder();<br>
....<br>
fulltextXML = builder.build(new FileInputStream(filename));<br>
<br>
-- fails with an exception ---<br>
<br>
C:\HTMLs\00063185_200_1_67\00063185_200_1_67_Document.xml is not well-formed.<br>
org.jdom.input.JDOMParseException: Error on line 5: The entity "nbsp"
was referenced, but not declared.<br>
Error on line 5: The entity "nbsp" was
referenced, but not declared.<br>
<br>
<br>
Is there a way to resolve such entities, without having to declare the DOCTYPE in the XML file? <br>
<br>
<br>
<br>
Thanks in advance!<br>
<br>
Vish<br>
<br>
<br>
Sample XML file:<br>
<br>
XML FILE <br>
--------------<br>
<br>
<?xml version="1.0" encoding="UTF-8"?><br>
<object_document><br>
<art_title>
Muscular Alteration of Gill Geometry in vitro: Implications for
Bivalve Pumping Processes -- Medler and Silverman 200 (1): 77 -- The
Biological Bulletin</art_title><br>
<converted_from type='HTML'>BiolBull V 200 I 1 P 77 Fulltext 00063185.htm</converted_from><br>
<fulltext>&nbsp;Biol. Bull. 200:
77-86. (February 2001)&#169; 2001 Marine Biological
LaboratoryMuscular Alteration of Gill Geometry in vitro: Implications
for Bivalve Pumping ProcessesScott Medler* and Harold
SilvermanLouisiana State University, Baton Rouge, Louisiana 70803*
Author to whom correspondence should be addressed. Current address:
Department of Biology, Colorado State University, Ft. Collins, CO
80523. E-mail: Skmedler{at}aol.com<!-- var u = "Skmedler", d =
"<a href="http://aol.com">aol.com</a>"; document.getElementById("em0").innerHTML = "" + u + "@" + d
+ ""//--><br>
&nbsp;Received 23 March 2000; accepted 19 October 2000.<br>
</fulltext><br>
<jrnl_title>BiolBull</jrnl_title><br>
<issn>00063185</issn><br>
<volume>200</volume><br>
<issue>1</issue><br>
<fpage>77</fpage><br>
</object_document><br>
<br>
<br>
<br>
<br>
<br>
<br>