[jdom-interest] Code submision: JDOM2 the dual tree

Jason Hunter jhunter at acm.org
Mon Nov 27 19:34:38 PST 2000


> > Not true.  Elements can have PIs returned by getMixedContent().  A
> > Document just has convenience accessor methods because that's where PIs
> > commonly reside.
> 
> This has come up a few times... Perhaps this is a feature that causes more
> problems that it solves? Removing these methods would get rid of 4 methods from
> the API (3 gets and a set, right?), and reduce confusion. And the benefit they
> provide is slight.

They were put there as a convenience for tools like Cocoon which put a
lot of PIs outside the root element.  If you use the methods, speak up.

> BTW, does the XML declaration show up in the Document's list of PIs? 

No.

> It's not technically a PI, right? 

Nope.

> Perhaps Document should have get/setXMLDeclaration()
> methods? (These could probably just take PI objects, since 
> they're basically identical.)

It would let you set the standalone flag.  Anything else?

-jh-



More information about the jdom-interest mailing list