code: public static final Element getNextSiblingElement(Node node) {
      	
      	List<Node> siblings = node.getParent().getChildren();
      	Node n = null;
      	
      	int index = siblings.indexOf(node) + 1;
      	if(index>0 && index<siblings.size()) {
  	    	n = siblings.get(index);
  	    	while(!(n instanceof Element) && ++index < siblings.size()) {
  	    		n = siblings.get(index);
  	    	}
  	    	
  	    	if(index==siblings.size()) {
  	    		n = null;
  	    	}
      	}
      	
          return (Element) n;
      }
docs: Get the next sibling element.
  
  @param node The start node.
  @return The next sibling element or {@code null}.