Java tutorial
//package com.java2s; //License from project: Apache License import org.w3c.dom.Document; public class Main { public static String getContent(Document doc, String tagName) { //http://www.mkyong.com/java/how-to-read-xml-file-in-java-dom-parser/ return doc.getElementsByTagName(tagName).item(0).getTextContent(); } }