[jdom-interest] Ampersand question

tsasala at hifusion.com tsasala at hifusion.com
Wed Jul 12 17:01:03 PDT 2000


	I have a block of HTML code that looks like:

	<td>this is a test &amp; test</td>

	When I output the DOM document, I get pretty much the same
thing back (within reasonable whitespace limits).  However, when I 
output the document by calling getMixedContent and iterating
over the content, the ampersand comes out as a single '&'.
Ultimately this will blow up when I parse it again.  I 
output the content by using getSerializedForm on all
the different object types (elements, entities, comments, etc).

	Shouldn't the getSerializedForm output &amp; instead
of &?  The outputter class does special processing to output
<, >, & as their escaped equivalents.  Am I missing something
here?

	-tom



More information about the jdom-interest mailing list