Here you can find the source of GetNextSiblingElement(Node start)
Parameter | Description |
---|---|
start | the node to get the sibling of |
public static Node GetNextSiblingElement(Node start)
//package com.java2s; import org.w3c.dom.*; public class Main { /**gets the sibling element of a node * @param start the node to get the sibling of * @return the sibling node*//*from w ww. j a v a2 s.c om*/ public static Node GetNextSiblingElement(Node start) { if (start == null) return start; Node node = start.getNextSibling(); if (node == null) return node; else if (node.getNodeType() != Node.ELEMENT_NODE) return GetNextSiblingElement(node); else return node; } }