File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 18116
    
    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
read xml file
reading xml from file
XSL Categorize by Inner property values
HFSJ book: Cookie example chapter 6 plz Help :(
XML file parsing in Java using SAX