My apologies...

OK, I tried createTextNode(Character.toString('\u0010')) in my java code.
Serialization may happen correctly, however when I need to parse back into a
document I get an exception.

org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x10) was
found in the element content of the document.

What's the issue?

Thanks,
Derrick


-----Original Message-----
From: Joseph Kesselman [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 16, 2004 9:28 AM
To: '[EMAIL PROTECTED]'
Subject: Re: insert carriage return





Whether working with DOM or SAX, the answer is the same: just put the
characters you want  into a Text node's string value, as it would appear if
you had obtained the DOM by parsing a document. It's the serializer's
responsibility to render that appropriately when you output XML.

If you want a line break, XML's representation of line break is the newline
character (ASCII/Unicode 10). The serializer may convert that to CRLF if
that's the appropriate representation of line break on your system. (Note
that XML parsers must convert CRLF, CR, or LF to newline.)

If you really want a carriage return character, use it (ASCII/Unicode 13).
The serializer will recognize that the only way you can have this character
in XML content is if it was escaped, and will render it appropriately.

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk
This electronic transmission is strictly confidential to Smith & Nephew and
intended solely for the addressee.  It may contain information which is
covered by legal, professional or other privilege.  If you are not the
intended addressee, or someone authorized by the intended addressee to
receive transmissions on behalf of the addressee, you must not retain,
disclose in any form, copy or take any action in reliance on this
transmission.  If you have received this transmission in error, please
notify the sender as soon as possible and destroy this message.

Reply via email to