Meaningless Drivel is fun!
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

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
Donny Wi

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
I agree. Here's the link:
subject: How to display "\n" in xml file?
It's not a secret anymore!