opaf-data/src/main/java/inescid/util/XmlUtil.java
/**
     * An Iterable for the Element's childs, with a particular name, of a node
     * 
     * @param n
     *            the node get the children from
     * @param elementName
     *            the name of the child elements
     * @return An Iterable for the Element's children, with a particular name, of a node
     */
An Iterable for the Element's childs, with a particular name, of a node

@param n
the node get the children from
@param elementName
the name of the child elements
@return An Iterable for the Element's children, with a particular name, of a node
An Iterable for the Element ' s childs with a particular name of a node @param n the node get the children from @param elementName the name of the child elements @return An Iterable for the Element ' s children with a particular name of a node
public static Iterable<Element> elements(Element n, String elementName) {
        NodeList subNodes = n.getElementsByTagName(elementName);
        int sz = subNodes.getLength();
        ArrayList<Element> elements = new ArrayList<Element>(sz);
        for (int idx = 0; idx < sz; idx++) {
            Node node = subNodes.item(idx);
            elements.add((Element)node);
        }
        return elements;
    }
public static Iterable < Element > elements ( Element n , String elementName ) { NodeList subNodes = n . getElementsByTagName ( elementName ) ; int sz = subNodes . getLength ( ) ; ArrayList < Element > elements = new ArrayList < Element > ( sz ) ; for ( int idx = 0 ; idx < sz ; idx ++ ) { Node node = subNodes . item ( idx ) ; elements . add ( ( Element ) node ) ; } return elements ; }
An Iterable for the Element's childs, with a particular name, of a node
An Iterable for the Element ' s childs with a particular name of a node