Code example for DocumentBuilder

Methods: parsesetEntityResolver

		throws IOException 
		try { 
			DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
			DocumentBuilder builder = factory.newDocumentBuilder();
			builder.setEntityResolver(new NoResolver());
			return builder.parse((new InputSource(new StringReader(data))));
		} catch (Exception ex) {
			throw new IOException(ex);
	 * Returns a XMLStreamReader for the XML document at the given path. 
	public static XMLStreamReader createXMLStreamReader(String file)
		throws IOException, XMLStreamException 
		return createXMLStreamReader(new FileInputStream(file));
Connect your IDE to all the code out there  Get Codota for Java