[jdom-interest] setOmitDeclaration(false) doesen't work

Joern.Karthaus at kampf.de Joern.Karthaus at kampf.de
Fri Feb 6 08:12:41 PST 2004


Hello List

I want to omit <?xml version="1.0" encoding="UTF-8"?> from the ouputter

Document domDoc;

XMLOutputter outputter = new XMLOutputter();
String data2 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><MESSAGE ID
=\"7\"><HEADER>KOPF HJHHHH</HEADER><BODY>new XMLOutputter
()</BODY></MESSAGE>";
SAXBuilder saxbuilder = new SAXBuilder();
try {
      domDoc = saxbuilder.build(new StringReader(data2));
      outputter.setOmitDeclaration(false );
      outputter.setOmitEncoding(false);
      outputter.output(domDoc,System.out);
} catch (.....


but it doesent work

whats wrong

Thanks for Help







More information about the jdom-interest mailing list