Here you can find the source of getFirstNode(NodeList nodeList)
static Node getFirstNode(NodeList nodeList)
//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*/ }