Code example for InputSource

Methods: setCharacterStream

0
	    return ""; 
	} 
	 
	public static Document parseXmlStringToDocument(String xmlString) throws ParserConfigurationException, SAXException, IOException {
        DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
        InputSource is = new InputSource();
        is.setCharacterStream(new StringReader(xmlString));
        return db.parse(is);
	} 
} 
Contextual code suggestions in your IDE  Get Codota for Java