Java tutorial
//package com.java2s; //License from project: Apache License import org.w3c.dom.Element; import org.w3c.dom.Node; public class Main { public static Element getNextChildElement(Node node) { Node n = node.getFirstChild(); while (n != null && n.getNodeType() != Node.ELEMENT_NODE) { n = n.getNextSibling(); } return (Element) n; } }