/** * Retrieve all child elements of the given DOM element that match the given * element name. Only look at the direct child level of the given element; * do not go into further depth (in contrast to the DOM API's * <code>getElementsByTagName</code> method). * * @param element the DOM element to analyze * @param childEleName the child element name to look for * @return a List of child <code>org.w3c.dom.Element</code> instances * @see org.w3c.dom.Element * @see org.w3c.dom.Element#getElementsByTagName */ public static List<Element> getChildElementsByTagName(final Element element, final String childEleName) { return getChildElementsByTagName(element, new String[] {childEleName}); }