Here you can find the source of getNextTypedNode(Node node, short nodeType)
private static Node getNextTypedNode(Node node, short nodeType)
//package com.java2s; import org.w3c.dom.*; public class Main { private static Node getNextTypedNode(Node node, short nodeType) { node = node.getNextSibling();//from w w w.j ava 2 s .co m while (node != null && node.getNodeType() != nodeType) { node = node.getNextSibling(); } return node; } private static short getNodeType(Node node) { return (node != null ? node.getNodeType() : -1); } }