Code example for Node

Methods: getFirstChild, hasChildNodes

0
        case (START_DOCUMENT): {
          currentNode = document.getDocumentElement();
          return START_TAG;
        } 
        case (START_TAG): {
          if (currentNode.hasChildNodes()) {
            // The node has children, navigate down 
            return processNextNodeType( 
                currentNode.getFirstChild());
          } else { 
            // The node has no children 
            return END_TAG;
          } 
        } 
        case (TEXT): {
          return navigateToNextNode(currentNode);
        } 
        default: { 
          // This can only happen if mEventType is 
          // assigned with an unmapped integer. 
          throw new RuntimeException(