opaf-data/src/main/java/inescid/util/XmlUtil.java
/**
     * An iterable for all the Element childs of a node
     * 
     * @param n
     *            the node get the children from
     * @return An iterable for all the Element childs of a node
     */
An iterable for all the Element childs of a node

@param n
the node get the children from
@return An iterable for all the Element childs of a node
An iterable for all the Element childs of a node @param n the node get the children from @return An iterable for all the Element childs of a node
public static Iterable<Element> elements(Element n) {
        int sz = n.getChildNodes().getLength();
        ArrayList<Element> elements = new ArrayList<Element>(sz);
        for (int idx = 0; idx < sz; idx++) {
            Node node = n.getChildNodes().item(idx);
            if (node instanceof Element) elements.add((Element)node);
        }
        return elements;
    }
public static Iterable < Element > elements ( Element n ) { int sz = n . getChildNodes ( ) . getLength ( ) ; ArrayList < Element > elements = new ArrayList < Element > ( sz ) ; for ( int idx = 0 ; idx < sz ; idx ++ ) { Node node = n . getChildNodes ( ) . item ( idx ) ; if ( node instanceof Element ) elements . add ( ( Element ) node ) ; } return elements ; }
An iterable for all the Element childs of a node
An iterable for all the Element childs of a node