Java XML Node Next getNextElement(Node node)

Here you can find the source of getNextElement(Node node)

Description

get Next Element

License

Open Source License

Declaration

public static Element getNextElement(Node node) 

Method Source Code

//package com.java2s;

import org.w3c.dom.Node;

import org.w3c.dom.Element;

public class Main {
    public static Element getNextElement(Node node) {
        node = node.getNextSibling();//from w  ww  .  ja  va 2  s  .  c  om
        while (node != null) {
            if (node.getNodeType() == Node.ELEMENT_NODE) {
                return (Element) node;
            }

            node = node.getNextSibling();
        }

        return null;
    }
}

Related

  1. getNext(Node node)
  2. getNextComment(Node element)
  3. getNextComment(Node element)
  4. getNextElement(Node el)
  5. getNextElement(Node node)
  6. getNextElement(Node node)
  7. getNextElementNode(Node node)
  8. getNextElementNode(Node node)
  9. getNextNode(Node current)