aspose file tools*
The moose likes XML and Related Technologies and the fly likes How to preserve linefeed in XML file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to preserve linefeed in XML file" Watch "How to preserve linefeed in XML file" New topic
Author

How to preserve linefeed in XML file

jonathan ford
Greenhorn

Joined: Feb 16, 2008
Posts: 4
I have a XML file looks like:
<Content>Hello
everyone, how
are you
doing today?
</Content>
when I use IE to open the file, it looks like:
<Content>Hello everyone, how are you doing today?</Content>

Anyone can provide suggestion? Thanks
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18880
    
    8

Now try it with:See what's happening? IE is "pretty-printing" the XML. It will indent child elements on a new line, for example, and that isn't consistent with preserving whitespace within text nodes.

I can't see where this would be a real problem. You were just curious, right?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to preserve linefeed in XML file