Harry Liljeström wrote:
Hi,

my XSL transform outputs a XML file. I suppose Xerces writes that particular XML file during xalanTransformer.transform(...) method call. The outputted file contains a sequence of '0x0D 0x0D 0x0A' after each XML element. I would need to have a sequence of '0x0D 0x0A' instead. How can I do this? Does the Xalan API provide a method to manipulate the Xerces behavior?
Xalan's serializer is doing the generation of the output, not Xerces-C's DOMWriter or DOMLSSerializer (depending on the version of Xerces-C you're using).

When you get strange CR/LF results, it usually means you're writing to a file that's been opened in text mode, rather than binary mode.

You can usually verify this by serializing to a memory buffer instead of a file, and verifying the serializer is only generating CR LF, and not CR CR LF. If you see CR CR LF in the memory buffer, then something is happening earlier in the processing chain.

Dave

Reply via email to