[jdom-interest] Printing a Document !

steven.gould at cgiusa.com steven.gould at cgiusa.com
Fri Feb 9 12:00:26 PST 2001

Tanu wrote:

> I'm a biginner and I don't know how reasonable question is this still I
> would be grateful if someone can tell me how to print the full structure of
> a Document? Can I a generate an structure similar to the original XML file
> using Document class?


Here's some skeletal code that'll do this:

XMLOutputter outputter = new XMLOutputter( "  ", true );
outputter.output( doc );

// To output an element in XML, use
outputter.output( element );


Can this type of question be added to the FAQ?


More information about the jdom-interest mailing list