Here you can find the source of getChildElements(Element el)
public static Vector getChildElements(Element el)
//package com.java2s; import java.util.Vector; import org.w3c.dom.*; public class Main { /** Gets a list of the given element's child DOM elements. */ public static Vector getChildElements(Element el) { return getChildElements(null, el); }// w w w . j a v a2 s . com /** * Gets a list of the given element's child DOM elements * with the specified name, or all child elements if name is null. */ public static Vector getChildElements(String name, Element el) { if (el == null) return null; Vector v = new Vector(); NodeList list = el.getChildNodes(); int size = list.getLength(); String cName = ":" + name; for (int i = 0; i < size; i++) { Node node = list.item(i); if (!(node instanceof Element)) continue; String nodeName = node.getNodeName(); //if (name == null || name.equals(getName(node))) v.add(node); if (name == null || nodeName.equals(name) || nodeName.endsWith(cName)) { v.add(node); } } return v; } }