code: int navigateToNextNode(Node node)
        throws XmlPullParserException {
      Node nextNode = node.getNextSibling();
      if (nextNode != null) {
        // Move to the next siblings
        return processNextNodeType(nextNode);
      } else {
        // Goes back to the parent
        if (document.getDocumentElement().equals(node)) {
          currentNode = null;
          return END_DOCUMENT;
        }
        currentNode = node.getParentNode();
        return END_TAG;
      }
    }
docs: Navigate to the next node after a node and all of his
  children have been explored.
  
  If the node has unexplored siblings navigate to the
  next sibling. Otherwise return to its parent.
  
  @param node the node which was just explored.
  @return {@link XmlPullParserException#START_TAG} if the given
  node has siblings, {@link XmlPullParserException#END_TAG}
  if the node has no unexplored siblings or
  {@link XmlPullParserException#END_DOCUMENT} if the explored
  was the root document.
  @throws XmlPullParserException if the parser fails to
  parse the next node.