XML to Text with XSLT

Discussions

XML & Web services: XML to Text with XSLT

  1. XML to Text with XSLT (4 messages)

    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????



    Cheers!!!

    Threaded Messages (4)

  2. XML to Text with XSLT[ Go to top ]

    Use the <xsl:text> tag to insert additional spacing into your generated text file. For example, the following would insert a line break:

    <xsl:text>
    </xsl:text>
  3. XML to Text with XSLT[ Go to top ]

    You can also consider to take a look at FOP Apache project. They have inplementation of XML formatting - FO

    See http://xml.apache.org/fop/index.html
  4. XML to Text with XSLT[ Go to top ]

    As said before the most easy job is to put <xsl:text>
    FOP is not really required for this simple job but to generate other output formats like PDF probably FOP would help.
  5. XML to Text with XSLT[ Go to top ]

    Can someone advice as to how I'd be solving the problem?
    Well, you might want to try RTFM. If that doesn't work, get a job at Burger King.