[jdom-interest] issue on processing instructions OK !?

Jason Hunter jhunter at collab.net
Fri Dec 29 03:39:56 PST 2000

> Document doc = new Document(); //not Accepted by the compiler
> doc.addContent(myPI);
> doc.addContent(rootElement);
> it seems simplier like this ?

Yep, but the above creates a Document that is not well-formed. 
Documents are required by the XML spec to have one root element.  To
allow otherwise would eliminate a nice general feature of JDOM.


More information about the jdom-interest mailing list