Code example for Node

Methods: getNodeType

0
    LOG.log(Level.FINE, "enabled -> null");
    return null; 
  } 
 
  private boolean useManifestGrammar(Node node) {
    if (node.getNodeType() == node.ELEMENT_NODE) {
      Element root = (Element) node;
      /* AndroidManifest.xml starts with something like 
         <manifest xmlns:android="http://schemas.android.com/apk/res/android" 
                   package="org.foo.simpleandroidapp"> 
       */ 
      if ("manifest".equals(root.getNodeName()) 
          && (root.getAttributeNode("xmlns:android") != null
              || root.getAttributeNode("package") != null)) {
        LOG.log(Level.FINE, "enabled -> {0}", node);
        return true; 
      } 
    } 
    return false; 
  }