*
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
Author

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:

<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

Joined: Jan 23, 2002
Posts: 11962
    
    5
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