Java XML NodeList getNode(String tagName, NodeList nodes)

Here you can find the source of getNode(String tagName, NodeList nodes)

Description

get Node

License

Open Source License

Declaration

public static Node getNode(String tagName, NodeList nodes) 

Method Source Code

//package com.java2s;

import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

public class Main {
    public static Node getNode(String tagName, NodeList nodes) {
        for (int x = 0; x < nodes.getLength(); x++) {
            Node node = nodes.item(x);
            if (node.getNodeName().equalsIgnoreCase(tagName)) {
                return node;
            }/*from  w  ww  . j ava  2  s  .co m*/
        }

        return null;
    }
}

Related

  1. getFirstTextValueFromNodeList(NodeList nList)
  2. getFirstValue(NodeList nodes)
  3. getMetaScriptType(List metaNodeList)
  4. getMethodNames(NodeList methodNodes)
  5. getNode(NodeList nodes, String tagName)
  6. getNodeByNodeName(NodeList nodes, String nodeName)
  7. getNodeFromNodeList(NodeList list, String name)
  8. getNodeFromNodeList(NodeList nl, String nodeName, int index)
  9. getNodeFromNodeList(NodeList nodeList)