Here you can find the source of getChildElements(Node start)
public static List getChildElements(Node start)
//package com.java2s; /*// w w w . j a va2s .c om * Copyright (c) 2012. betterFORM Project - http://www.betterform.de * Licensed under the terms of BSD License */ import org.w3c.dom.*; import java.util.ArrayList; import java.util.List; public class Main { /** * returns a java.util.List of Elements which are children of the start Element. */ public static List getChildElements(Node start) { List l = new ArrayList(); NodeList nl = start.getChildNodes(); int len = nl.getLength(); Node n = null; for (int i = 0; i < len; i++) { n = nl.item(i); if (n.getNodeType() == Node.ELEMENT_NODE) { l.add(n); } } return l; } }