Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import org.w3c.dom.Node;

public class Main {
    public static Node getNextHomoSibling(Node aNode) {
        Node nextSibling = aNode;
        while ((nextSibling = nextSibling.getNextSibling()) != null) {
            if (nextSibling.getNodeName().equals(aNode.getNodeName())) {
                return nextSibling;
            }
        }
        return null;
    }
}