Here you can find the source of getNextSiblingElement(Node node)
Parameter | Description |
---|---|
node | the node to process. |
public static Element getNextSiblingElement(Node node)
//package com.java2s; /*//from www .j a v a2 s. co m * Copyright (c) 2012. betterFORM Project - http://www.betterform.de * Licensed under the terms of BSD License */ import org.w3c.dom.*; public class Main { /** * Returns the next sibling element of the specified node. * <p/> * If there is no such element, this method returns <code>null</code>. * * @param node the node to process. * @return the next sibling element of the specified node. */ public static Element getNextSiblingElement(Node node) { Node sibling = node.getNextSibling(); if ((sibling == null) || (sibling.getNodeType() == Node.ELEMENT_NODE)) { return (Element) sibling; } return getNextSiblingElement(sibling); } }