Code example for StringReader

Methods: close

	// Get results in the form of a DOM to be parsed 
	public static Document getDOMbody(String response) {
		Document doc = null;
		try { 
			StringReader reader = new StringReader (response);
			InputSource inputSource = new InputSource( reader );
			DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
		    DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
		    doc = dBuilder.parse(inputSource);
		} catch (Exception e) {
			Log.v("PARSE ERROR", e.getMessage());
		return doc;
	// Parse the HTTP response 
	public static String parseHttpResponse(HttpResponse response) {
Connect your IDE to all the code out there  Get Codota for Java