Hi Theis I don't think the XMLResult class supports the OutputKeys.METHOD or OutputKeys.OMIT_XML_DECLARATION yet.
For now if you modify your code to use StreamResult from JAXP (javax.xml.transform.stream) you should be fine. e.g. see the amended code below... ----- Original Message ----- From: <[EMAIL PROTECTED]> > Hi everybody! > > I'm trying to get rid of the xml declarations in the output when > transforming a xml file (I'm transforming a xml file to a text file). I > both tried: transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION , > "no"); and <xsl:output method="text" omit-xml-declaration="no"/>. None of > these seems to work! > > Here are my java code: > > DocumentSource source = new DocumentSource( document ); StreamResult result = new StreamResult(out); > transformer.setOutputProperty(OutputKeys.METHOD, "text"); > transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION , "no"); > transformer.transform(source, result); James _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user
