[jdom-interest] Patch: Element.getChildren(Namespace)

Jason Hunter jhunter at collab.net
Tue Feb 20 08:49:47 PST 2001


Hugh Emberson wrote:
> 
> Hi Guys,
> 
> The following patch adds the method getChildren(Namespace) to element.  This
> came about because I found myself writing quite a few loops like this:
> 
>          Iterator itr = currentElement.getChildren().iterator();
>          while (itr.hasNext()) {
>            Element elem = (Element)itr.next();
>            if(elem.getNamespaceURI() != NS)
>               continue;
>          }
> 
> I think it is also quite symmetrical with the other getChildren() methods.

Could you please give some specific use cases for this?

-jh-



More information about the jdom-interest mailing list