Project

Profile

Help

Remove all CR LF from XML Output

Added by Anonymous over 18 years ago

Legacy ID: #3454272 Legacy Poster: packley (packley)

Is it possible to remove ALL carriage returns and linefeeds from the output of the SAXON XSLT Processor? I need to output an XML document that is "all on one line". Everything from the <?xml version="1.0" ?> to the ending tag of the document needs to be on one line. Thus far I've gotten it to where the <?xml version="1.0" ?> is one line and the rest of the xml is on the next line. Thanks! Paul PS - I know why would you need todo this? I'm asking too. The only thing I can say is COBOL and XML don't mix... :)


Replies (2)

RE: Remove all CR LF from XML Output - Added by Anonymous over 18 years ago

Legacy ID: #3454496 Legacy Poster: Michael Kay (mhkay)

There will only be newlines in the output if: (a) you copy them from the source document, or (b) you have code in your stylesheet that generates them, or (c) you request indent="yes" If you don't want newlines, you need to work out which of the above three things you are doing, and stop doing it. Michael Kay http://www.saxonica.com/

RE: Remove all CR LF from XML Output - Added by Anonymous over 18 years ago

Legacy ID: #3454631 Legacy Poster: packley (packley)

Yea well wouldn't you know it... I was not using the SAXON classes, forgot to set that in my Java program... Works fine now! Thanks!

    (1-2/2)

    Please register to reply