Hi Andreas,
 
the asXML() method just provides you an easy way to get a default Sting-value of your document. However, if you want to make changes to this default format, you'll have to use the XMLWriter, e.g.:
 
Document document = ...;
OutputFormat format = OutputFormat.createPrettyPrint();
format.setSuppressDeclaration(true);
StringWriter writer = new StringWriter();
XMLWriter xmlWriter = new XMLWriter(writer, format);
xmlWriter.write(document);
String xml = writer.toString();
 
 
regards,
Maarten

Andreas Andersson <[EMAIL PROTECTED]> wrote:
Hi!

Is there a way of not getting the
part when exporting a document or node with asXML()?

--
Andreas Andersson
IT Dept.
Travelstart Nordic
[EMAIL PROTECTED]
http://www.travelstart.se


-------------------------------------------------------
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


Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web

Reply via email to