code: private static String getValueOfTagInXMLFile( String filePath, String tagName )
  	throws ParserConfigurationException, SAXException, IOException {
  
  		File fXmlFile = new File(filePath);
  		DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
  		DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
  		Document doc = dBuilder.parse(fXmlFile);
  
  		// Optional, but recommended
  		// Read this: http://stackoverflow.com/questions/13786607/normalization-in-dom-parsing-with-java-how-does-it-work
  		doc.getDocumentElement().normalize();
  
  		NodeList nList = doc.getElementsByTagName(tagName);
  		String valueOfTagName = "";
  
  		for (int temp = 0; temp < nList.getLength(); temp++) {
  			Node nNode = nList.item(temp);
  			valueOfTagName = nNode.getTextContent();
  		}
  
  		return valueOfTagName;
  	}
docs: FIXME: there must be a shorter way with XPath...