File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes How to display Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to display "\n" in xml file?" Watch "How to display "\n" in xml file?" New topic
Author

How to display "\n" in xml file?

lily zou
Ranch Hand

Joined: Jan 15, 2002
Posts: 50
Hi, I have a really simple question :
How to display return character "\n" inside xml file ? I use Apache/Tomcat/Cocoon as my server.
Thanks in advance
lily
Donny Wi
Greenhorn

Joined: Jan 24, 2002
Posts: 13
I'm not so sure what do you mean by displaying the return character, "\n".
If you try to print the back-slash and a letter "n", you can type "\n". If you want to display the return (newline) character, visually, I believe there is no character representation for newline character because it is invisible.
If you want to display a paragraphy with multiple line (human reader has to assume there is a newline at the end of each line), you can display it with CDATA
This is my example:


Donny Widjaja
 
Don't get me started about those stupid light bulbs.
 
subject: How to display "\n" in xml file?
 
Similar Threads
Rendering XML in browser
Can someone help me with this assignement? (Function)
xml in j2me
XML File Reading
xml display in struts