Michael Wenger
Mon, 07 Mar 2005 06:25:20 -0800
Hi Andreas!
Is there a way of not getting the <?xml version="1.0" encoding="UTF-8"?> part when exporting a document or node with asXML()?
public void asXMLwithoutDecl(Node node, OutputStream out) throws Exception
{
OutputFormat outformat = OutputFormat.createPrettyPrint();
outformat.setSuppressDeclaration(true);
XMLWriter writer = new XMLWriter(out, outformat);
writer.write(node);
writer.flush();
}hth, Michael
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ dom4j-user mailing list dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user