Here you can find the source of getChildTagValue(Node node, String tag)
public static String getChildTagValue(Node node, String tag)
//package com.java2s; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Main { public static String getChildTagValue(Node node, String tag) { Element element = (Element) node; NodeList childrenWithTag = element.getElementsByTagName(tag) .item(0).getChildNodes(); Node valueNode = (Node) childrenWithTag.item(0); return valueNode.getNodeValue(); }// w w w .j a v a2s . c om }