public static List<Element> getChildElements(final Element elem, final String ns, final String name) {
        final NodeList children =  elem.getChildNodes();
        final List<Element> res = new ArrayList<>(children.getLength());
        for (int i = 0; i < children.getLength(); i++) {
            final Node child = children.item(i);
            if (child.getNodeType() == Node.ELEMENT_NODE) {
                if (Objects.equals(child.getNamespaceURI(), ns) && name.equals(child.getLocalName())) {
                    res.add((Element) child);
                }
            }
        }
        return res;
    }
public static List < Element > getChildElements ( final Element elem , final String ns , final String name ) { final NodeList children = elem . getChildNodes ( ) ; final List < Element > res = new ArrayList < > ( children . getLength ( ) ) ; for ( int i = 0 ; i < children . getLength ( ) ; i ++ ) { final Node child = children . item ( i ) ; if ( child . getNodeType ( ) == Node . ELEMENT_NODE ) { if ( Objects . equals ( child . getNamespaceURI ( ) , ns ) && name . equals ( child . getLocalName ( ) ) ) { res . add ( ( Element ) child ) ; } } } return res ; }
List child elements by element name.

@param ns namespace URL, {@code null} for empty namespace
@param elem root element
@param name element local name to match elements
@return list of matching elements