protected Document getWebXmlDocument ( String baseDir ) throws ParserConfigurationException , FactoryConfigurationError , SAXException , IOException { File webXml = new File ( baseDir , WEB_XML_FILE_PATH ) ; DocumentBuilder docBuilder = DocumentBuilderFactory . newInstance ( ) . newDocumentBuilder ( ) ; docBuilder . setEntityResolver ( new EntityResolver ( ) { public InputSource resolveEntity ( String publicId , String systemId ) throws SAXException , IOException { return null ; } } ) ; Document doc = docBuilder . parse ( webXml ) ; return doc ; }
Returns the XML document of the web . xml file