Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to display "\n" in xml file?

 
lily zou
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic