Here you can find the source of getTextContent(NodeList nodeList)
static String getTextContent(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 String getTextContent(NodeList nodeList) { Node node = getFirstNode(nodeList); if (node == null) return null; return node.getTextContent(); }// ww w.j a v a 2s . c o m static Node getFirstNode(NodeList nodeList) { if (nodeList == null || nodeList.getLength() == 0) return null; return nodeList.item(0); } }