Parsing the XML
Get the parserDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder();
The default is to get a non-validating parser. Add configurations factory.setValidating(true); factory.setNamespaceAware(true);
Run the parser: Document document = builder.parse( **XML file** );