[jdom-interest] Unicode & JDOM
Alex Iskold
alex.iskold at thesmallworlds.com
Mon Nov 4 06:33:33 PST 2002
Hi all,
I am writing a program that transforms Java code into a flavor of XML.
Part of Character.java are lots Unicode characters. For example, on line 81:
public static final char MIN_VALUE = '\u0000';
When I translate this into XML I get the following exception:
org.jdom.IllegalDataException The data "'[]" is not legal for a JDOM attribute: 0x0 is not a legal XML character.
at org.jdom.Attribute.setValue(Attribute.java:517)
at org.jdom.Attribute.<init>(Attribute.java:245)
at org.jdom.Attribute.<init>(Attribute.java:265)
at org.jdom.Element.setAttribute(Element.java:1393)
I looked up previous archives and changed the encoding in XMLOutputter to
outputter.setEncoding( "ISO 10646-1" );
Now the parser can't read the docs at all.
Please let me know how to fix this.
Thank you,
Alex
Small Worlds
It's the structure that matters
http://www.thesmallworlds.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20021104/4e5baf72/attachment.htm
More information about the jdom-interest
mailing list