[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?

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

*Hello again">

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?


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

The Maersk Institute of Production technology at Southern Danish University 
Campusvej 55
DK-5230 Odense M
+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