Code example for Text

Methods: getData

0
			throws ParserConfigurationException, SAXException, IOException { 
 
		Document doc = getXmlDoc(xmlResponse);
		Element locationElement = (Element) doc.getElementsByTagName("original").item(0);
		Text text = (Text)locationElement.getChildNodes().item(0);
		return text.getData();
	} 
 
	private Document getXmlDoc(String source) throws ParserConfigurationException, SAXException, IOException{
		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
		DocumentBuilder builder = factory.newDocumentBuilder();
		InputSource input = new InputSource();
 
		input.setCharacterStream(new StringReader(source));
		return builder.parse(input);
 
	} 
 
	private String getResponseContent(HttpResponse response) throws IllegalStateException, IOException{
 
		InputStream content = response.getEntity().getContent();