Request: Element.getFirstElementWithTagName(String name);

All over the place I find myself doing:

NodeList nl = anElement.getElementsByTagName("TAG");
Element e = (Element) nl.item(0);

So I would like to request a convenience method:

Element.getFirstElementWithTagName(String name);

allowing:

Element e = anElement.getFirstElementWithTagName("TAG");

Much thanks for your consideration!

---
Chris Hubick
mailto:chris@hubick.com
http://www.hubick.com/

Received on Monday, 21 September 1998 16:48:09 UTC