Java XML NodeList getFirstNode(NodeList nodeList)

Here you can find the source of getFirstNode(NodeList nodeList)

Description

get First Node

License

Open Source License

Declaration

static Node getFirstNode(NodeList nodeList) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

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

public class Main {
    static Node getFirstNode(NodeList nodeList) {
        if (nodeList == null || nodeList.getLength() == 0)
            return null;
        return nodeList.item(0);
    }/*from  w w w. jav  a2s .  c o  m*/
}

Related

  1. getFirst(NodeList nodes)
  2. getFirstElement(NodeList list)
  3. getFirstElement(NodeList list)
  4. getFirstElement(NodeList nodes)
  5. GetFirstInstance(NodeList nList)
  6. getFirstNodeValue(NodeList nodeList)
  7. getFirstTextValueFromNodeList(NodeList nList)
  8. getFirstValue(NodeList nodes)
  9. getMetaScriptType(List metaNodeList)