This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 18541
    
    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
 
Similar Threads
reading xml from file
HFSJ book: Cookie example chapter 6 plz Help :(
XSL Categorize by Inner property values
read xml file
XML file parsing in Java using SAX