<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2920.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi all,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I am writing a program that transforms Java code
into a flavor of XML.</FONT></DIV>
<DIV><FONT face=Arial size=2>Part of Character.java are lots Unicode characters.
For example, on line 81:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>public static final char MIN_VALUE =
'\u0000';</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>When I translate this into XML I get the following
exception:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>org.jdom.IllegalDataException The data "'[]"
is not legal for a JDOM attribute: 0x0 is not a legal XML
character.</FONT></DIV>
<DIV><FONT face=Arial size=2> at
org.jdom.Attribute.setValue(Attribute.java:517)<BR> at
org.jdom.Attribute.<init>(Attribute.java:245)<BR> at
org.jdom.Attribute.<init>(Attribute.java:265)<BR> at
org.jdom.Element.setAttribute(Element.java:1393)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I looked up previous archives and changed the
encoding in XMLOutputter to </FONT></DIV>
<DIV><FONT face=Arial size=2>outputter.setEncoding( "ISO 10646-1"
);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Now the parser can't read the docs at
all.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Please let me know how to fix this.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Thank you,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Alex</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Small Worlds<BR>It's the structure that
matters<BR><A
href="http://www.thesmallworlds.com">http://www.thesmallworlds.com</A></FONT></DIV>
<DIV> </DIV>
<DIV> </DIV></BODY></HTML>