[jdom-interest] detach() [eg]

philip.nelson at omniresources.com philip.nelson at omniresources.com
Sat Apr 28 18:33:48 PDT 2001


> In the examples you give for detaching an Element, you always 
> include the
> state checks (isRootElement) -- as if (re)moving a root is a perfectly
> normal thing to do.  Yet, you argue that consumers of 
> Document don't need to
> check the state of the Document because removing the root 
> from a Document is
> a special case and not part of the normal flow of control.  
> Why is this a
> reasonable disparity?

Doing something with a document after you have removed the root is what is
outside the normal flow of control.  Consuming a document is normal.
Removing the root is normal.  The two together are not normal.



More information about the jdom-interest mailing list