Java XML Node Sibiling GetNextSiblingElement(Node start)

Here you can find the source of GetNextSiblingElement(Node start)

Description

gets the sibling element of a node

License

Open Source License

Parameter

Parameter Description
start the node to get the sibling of

Return

the sibling node

Declaration

public static Node GetNextSiblingElement(Node start) 

Method Source Code


//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;
    }
}

Related

  1. getNextSiblingElement(Node node)
  2. getNextSiblingElement(Node node)
  3. getNextSiblingElement(Node node)
  4. getNextSiblingElement(Node node)
  5. getNextSiblingElement(Node node, String elemNames[])
  6. getNextSiblingElementByName(Node node, String name)
  7. getNextSiblingElementNS(Node node, String uri)
  8. getNextSiblingElementNS(Node node, String[][] elemNames)
  9. getNextVisibleSiblingElement(Node node)