File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Newline character in table content Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Newline character in table content" Watch "Newline character in table content" New topic

Newline character in table content

Robby Jain

Joined: Apr 30, 2012
Posts: 9
i have a table and it is populated using dom now elements in dom contain \n
i require that where there is \n it should act as new line character help !!
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32819

In HTML, <br /> serves as a new line. Can you do a string search and replace to convert to the HTML new line?

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63547

Technically, in HTML it's <br>. <br/> is XHTML notation.

In preparation for HTML5, people should stop thinking along the XHTML lines.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Newline character in table content
jQuery in Action, 3rd edition