Here you can find the source of getNextHomoSibling(Node aNode)
Parameter | Description |
---|---|
n | a parameter |
name | a parameter |
public static Node getNextHomoSibling(Node aNode)
//package com.java2s; //License from project: Apache License import org.w3c.dom.Node; public class Main { /**/*from www. j a v a 2 s . c o m*/ * this function is different from above one. Though we still aim at finding * the node with the name. But we don't want to surpass some line. Say, if * the current Node is sourceOf, we don't want to go down to another * sourceOf which is under the current sourceOf. * * @param n * @param name * @return */ public static Node getNextHomoSibling(Node aNode) { Node nextSibling = aNode; while ((nextSibling = nextSibling.getNextSibling()) != null) { if (nextSibling.getNodeName().equals(aNode.getNodeName())) { return nextSibling; } } return null; } }