[jdom-interest] How to keep input - formatting.. Linebreaks

Morten Andersen mortena at mip.sdu.dk
Fri Nov 14 06:07:02 PST 2003


I'm building a document using SAXBuilder, and I want to keep the line 
breaks in the text-content of an attribute on one of the elements. How do I 
do that?

Example:
-----------------------------
<?xml version="1.0" encoding="UTF-8"?>
<page><part edit="false" text="dsdsfd"><view>dsdsfd&lt;br/&gt;
</view></part><part text="dfsfs

*Hello
*Hello again">

</part></page>
-------------------------------------
How can I keep the linebreaks from the source XML-file into the jdom Element?

Do I have to use CData or must I set a property on the SAXBuilder?

Thanks

Morten Andersen
Master of applied mathematics and computer science
Amanuensis
Interest areas:
   -e-learning
   -software engineering
   -applied math

The Maersk Institute of Production technology at Southern Danish University 
www.mip.sdu.dk
Campusvej 55
DK-5230 Odense M
Denmark
+45 6550-3654
+45 6171-1103
Jabber id: hat at jabber.dk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20031114/7e487f1a/attachment.htm


More information about the jdom-interest mailing list