| Author |
Writing new line character in DOM
|
Luqman Qaiser
Greenhorn
Joined: Aug 21, 2005
Posts: 18
|
|
Hi, How to write a new line character after any node in DOM. for e.g. if the DOM structure is <ROOT> <FIRSTNAME>Mahesh</FIRSTNAME><LASTNAME>Kumar</LASTNAME> </ROOT> How to change it to this below form <ROOT> <FIRSTNAME>Mahesh</FIRSTNAME> <LASTNAME>Kumar</LASTNAME> </ROOT> Thanks, Lucky
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
|
|
How to write a new line character after any node in DOM.
As far as XML is concerned, what you are talking about is a Node of type TEXT_NODE that has a content of a newline character sequence. In your example, it would be a child of the ROOT element. Incidently, you should go change your name to fit the JavaRanch name policy. Bill
|
Java Resources at www.wbrogden.com
|
 |
Luqman Qaiser
Greenhorn
Joined: Aug 21, 2005
Posts: 18
|
|
I have tried exactly what u suggested, But not working... Kindly Help.
|
 |
Dave Lenton
Ranch Hand
Joined: Jan 20, 2005
Posts: 1241
|
|
|
Here is everything one will ever want to know about whitespace in XSLT, even the sickest of questions that one can come up with in the most depraved of ones XSLT-whitespace related fantasies.
|
There will be glitches in my transition from being a saloon bar sage to a world statesman. - Tony Banks
|
 |
 |
|
|
subject: Writing new line character in DOM
|
|
|