I'm trying to use Transformer in order to convert a DOM Node into a string. This works, but unfortunately it sticks the xml header at the beginning of the string : < ?xml ... > For my particular application, I don't need this xml header. So how do you tell the transformer to avoid printing it ?
If you were doing an XSLT transformation, then you would use <xslutput omit-xml-declaration="yes"/>. So in your code I would tryThat's my best guess.
Bear in mind that the transformer cannot omit the XML declaration unless the encoding of the document it is writing is UTF-8. Any other encoding has to be specified in an XML declaration. [ February 05, 2006: Message edited by: Paul Clapham ]