SV: [jdom-interest] Automatic Character Escaping
Per Norrman
pernorrman at telia.com
Wed Apr 2 01:00:30 PST 2003
Hi,
Here's an idea. When creating the text data, use the
actual character value, in this case
"do\u00a0not\u00a0break"
Transform into a javax.xml.transform.stream.StreamResult and let
Xalan do the character escaping.
I've attached an example where I transform a JDOM document
into another JDOM document, then transforming that using
an identity transformation in order to get the escape
sequences. You should get the idea.
/Per Norrman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stylesheet.xsl
Type: text/xml
Size: 328 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20030402/d0398de7/stylesheet.xml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: copy.xsl
Type: text/xml
Size: 290 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20030402/d0398de7/copy.xml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MyTransformer.java
Type: application/octet-stream
Size: 2260 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20030402/d0398de7/MyTransformer.obj
More information about the jdom-interest
mailing list