Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML to text rendering

 
Anand Jayaraman
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys!!

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

Consider the following:

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

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

Hello!
Re: XSLT Help!!

Can you guys help me out???

Thanks



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
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the <xsl:text> element to output a newline character when appropriate.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic