common_helper/src/main/java/com/xiongyingqi/util/xml/DomUtils.java
public static List<Element> getChildElementsByTagName(Element ele, String[] childEleNames) {
        Assert.notNull(ele, "Element must not be null");
        Assert.notNull(childEleNames, "Element names collection must not be null");
        List<String> childEleNameList = Arrays.asList(childEleNames);
        NodeList nl = ele.getChildNodes();
        List<Element> childEles = new ArrayList<Element>();
        for (int i = 0; i < nl.getLength(); i++) {
            Node node = nl.item(i);
            if (node instanceof Element && nodeNameMatch(node, childEleNameList)) {
                childEles.add((Element) node);
            }
        }
        return childEles;
    }
public static List<Element> getChildElementsByTagName(Element ele, String[] childEleNames) {
        Assert.notNull(ele, "Element must not be null");
        Assert.notNull(childEleNames, "Element names collection must not be null");
        List<String> childEleNameList = Arrays.asList(childEleNames);
        NodeList nl = ele.getChildNodes();
        List<Element> childEles = new ArrayList<Element>();
        for (int i = 0; i < nl.getLength(); i++) {
            Node node = nl.item(i);
            if (node instanceof Element && nodeNameMatch(node, childEleNameList)) {
                childEles.add((Element) node);
            }
        }
        return childEles;
    }
public static List < Element > getChildElementsByTagName ( Element ele , String [ ] childEleNames ) { Assert . notNull ( ele , "Element must not be null" ) ; Assert . notNull ( childEleNames , "Element names collection must not be null" ) ; List < String > childEleNameList = Arrays . asList ( childEleNames ) ; NodeList nl = ele . getChildNodes ( ) ; List < Element > childEles = new ArrayList < Element > ( ) ; for ( int i = 0 ; i < nl . getLength ( ) ; i ++ ) { Node node = nl . item ( i ) ; if ( node instanceof Element && nodeNameMatch ( node , childEleNameList ) ) { childEles . add ( ( Element ) node ) ; } } return childEles ; }
Retrieves all child elements of the given DOM element that match any of the given element names.
Only looks at the direct child level of the given element; do not go into further depth
(in contrast to the DOM API's {@code getElementsByTagName} method).

@param ele           the DOM element to analyze
@param childEleNames the child element names to look for
@return a List of child {@code org.w3c.dom.Element} instances
@see org.w3c.dom.Element
@see org.w3c.dom.Element#getElementsByTagName
Retrieves all child elements of the given DOM element that match any of the given element names . Only looks at the direct child level of the given element ; do not go into further depth ( in contrast to the DOM API s { @code getElementsByTagName } method ) .