[jdom-interest] Missing removeContent() methods
bob mcwhirter
bob at werken.com
Thu May 2 15:33:22 PDT 2002
I think this is a case for a utility class that works with XPath...
XPath xpath = new JDOMXPath( "/foo/bar/b:az" );
EtherealUtilityThingy.detachAll( xpath.selectNodes() );
-bob
On Thu, 2 May 2002, Bradley S. Huffman wrote:
> Alex Rosen writes:
>
> > I don't see removeChildren(List). There is a removeChildren(), though I
> > can't think of a reason that anyone would want to remove all child Elements
> > but keep all other content. Maybe this is ripe for removal? If someone
> > really wanted to do that they could just do it manually in a few lines of
> > code.
>
> Yep and removeChildren(name,namespace) removes only one level down. I think
> the more common case would be to remove all matching elements below the
> context element. To me this one and getChild* are ripe for removal.
>
> > Hey, didn't we used to have a hasContent(), for efficiency?
>
> At one time it was need, but now since ContentList is always created it's
> not.
>
> > I see hasChildren(), but not hasContent().
>
> hasChildren is ripe for removal IMHO :)
>
> Brad
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
>
More information about the jdom-interest
mailing list