<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content='"MSHTML 4.72.3612.1706"' name=GENERATOR>
</HEAD>
<BODY bgColor=#c0c0c0>
<DIV>
<DIV><SPAN class=773044414-27071999><FONT face="" size=2><FONT color=#000000>I
am experiencing some strange behavior with the datachannel XML parser package
(the most recent one).</FONT></FONT></SPAN><FONT color=#000000></FONT></DIV>
<DIV><SPAN class=773044414-27071999><FONT face="" size=2><FONT color=#000000>In
my reading of the DOM spec, this is not appropriate behavior, but perhaps I am
missing something.</FONT></FONT></SPAN><FONT color=#000000></FONT></DIV>
<DIV><SPAN class=773044414-27071999><FONT face="" size=2><FONT
color=#000000></FONT></FONT></SPAN><FONT color=#000000> </FONT></DIV>
<DIV><SPAN class=773044414-27071999><FONT face="" size=2><FONT color=#000000>The
behavior is that when I do a <FONT
face=""><STRONG>'setPreserveWhiteSpace(true)</STRONG></FONT>' before parsing a
document, and the document</FONT></FONT></SPAN><FONT color=#000000></FONT></DIV>
<DIV><SPAN class=773044414-27071999><FONT face="" size=2><FONT
color=#000000></FONT></FONT></SPAN><FONT color=#000000><SPAN
class=773044414-27071999><FONT face="" size=2>contains strings with entity
references such as:</FONT></SPAN></FONT></DIV>
<DIV><FONT color=#000000><SPAN class=773044414-27071999><FONT face=""
size=2></FONT></SPAN></FONT> </DIV>
<DIV><SPAN class=773044414-27071999><FONT face="" size=2><FONT
color=#000000></FONT></FONT></SPAN><FONT color=#000000><SPAN
class=773044414-27071999><FONT face="Courier New" size=2>
<STRONG><element1> &lt; fubar &gt;
</element1></STRONG></FONT></SPAN></FONT></DIV>
<DIV><FONT color=#000000><SPAN class=773044414-27071999><FONT face="Courier New"
size=2><STRONG></STRONG></FONT></SPAN></FONT> </DIV>
<DIV><SPAN class=773044414-27071999><FONT face="" size=2><FONT
color=#000000>when I then do a <FONT face=""><STRONG>getText</STRONG>()
</FONT>on element1, what is returned is a java.lang.String that contains a
<STRONG>null</STRONG> (char 0) for each entity reference.
</FONT></FONT></SPAN><FONT color=#000000></FONT></DIV>
<DIV><SPAN class=773044414-27071999><FONT face="" size=2><FONT
color=#000000></FONT></FONT></SPAN><FONT color=#000000> </FONT></DIV>
<DIV><SPAN class=773044414-27071999><FONT face="" size=2><FONT
color=#000000>These nulls of course confound the rest of the code I am writing.
In side the DOM tree the entity reference objects are happily holding the
appropriate text representation i.e. '<' and
'>'.</FONT></FONT></SPAN><FONT color=#000000></FONT></DIV>
<DIV><SPAN class=773044414-27071999><FONT face="" size=2><FONT
color=#000000></FONT></FONT></SPAN><FONT color=#000000 face=""
size=2> </FONT></DIV>
<DIV><SPAN class=773044414-27071999><FONT color=#000000><FONT
size=2></FONT></FONT></SPAN><FONT size=2><FONT color=#000000>Turning off white
space preservation makes the <STRONG>getText</STRONG>() place appropriate
decoded entity references in the resulting string.</FONT></FONT><FONT
color=#000000></FONT></DIV>
<DIV><SPAN class=773044414-27071999><FONT face="" size=2><FONT
color=#000000></FONT></FONT></SPAN><FONT color=#000000> </FONT></DIV>
<DIV><SPAN class=773044414-27071999><FONT face="" size=2><FONT color=#000000>Bug
or feature?</FONT></FONT></SPAN><FONT color=#000000></FONT></DIV>
<DIV><SPAN class=773044414-27071999><FONT face="" size=2><FONT
color=#000000></FONT></FONT></SPAN><FONT color=#000000> </FONT></DIV>
<DIV><SPAN class=773044414-27071999><FONT color=#000000 face=Arial
size=2>erik</FONT></SPAN></DIV></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face="" size=2><FONT face="Comic Sans MS"><FONT color=#000000>Erik
James Freed</FONT></FONT></FONT><FONT color=#000000><FONT
face="Comic Sans MS"></FONT></FONT></DIV>
<DIV><FONT color=#000000 face="Comic Sans MS" size=2>InfoCanvas
Software</FONT></DIV>
<DIV> </DIV></BODY></HTML>