Here you can find the source of getString(Element el, String label)
public static String getString(Element el, String label)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.*; public class Main { public static String getString(Element el, String label) { NodeList l = el.getElementsByTagName(label); if (l.getLength() < 1) return null; Node n = l.item(0).getFirstChild(); return n == null ? "" : n.getNodeValue(); }// w ww. j a va 2 s . co m }