Andreas Andersson schrieb am 07.03.2005 15:32 :
Michael Wenger wrote:
I think, you have to write your own asXML-method, which sets
setSuppressDeclaration(true) on the OutputFormat:
Is that really the only way? I'm not interested in writing this string
(as this stage) but rather have it as a variable to work with.
I'm not aware of another way to do it. - But I am new to dom4j...
If you want to obtain a String, use this (untested):
public String asXMLwithoutDecl(Node node) throws Exception
{
ByteArrayOutputStream byteout = new ByteArrayOutputStream();
asXMLwithoutDecl(node, byteout);
return byteout.toString();
}
Please don't send me any more private mails. Use the mailing list instead.
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