wood burning stoves 2.0
The moose likes XML and Related Technologies and the fly likes XML to text rendering Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML to text rendering" Watch "XML to text rendering" New topic

XML to text rendering

Anand Jayaraman
Ranch Hand

Joined: Jan 28, 2004
Posts: 104
Hi Guys!!

I have an XML file and I'd like to convert it to a text output with XSLT.

Consider the following:

<subject> Re: XSLT Help!! </subject>
<body>Can you guys help me out???</body>

I'd like to have this in the following format in text!

Re: XSLT Help!!

Can you guys help me out???


My limited knowledge of XSLT can only output the data in a single line.

Can someone advice as to how I'd be solving the problem???
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
Use the <xsl:text> element to output a newline character when appropriate.

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
I agree. Here's the link: http://aspose.com/file-tools
subject: XML to text rendering
jQuery in Action, 3rd edition