* created and populated AppData structure
*/
public AppData parseFile(String xmlFile, boolean skipValidation)
throws Exception
{
SAXParser parser = new SAXParser();
// set the Resolver for the database DTD
DTDResolver dtdResolver = new DTDResolver();
parser.setEntityResolver(dtdResolver);
// We don't use an external content handler - we use this object
parser.setContentHandler(this);
parser.setErrorHandler(this);
// Validate the input file
parser.setFeature(
"http://apache.org/xml/features/validation/dynamic", true);
parser.setFeature("http://xml.org/sax/features/validation", true);
FileReader fr = new FileReader (xmlFile);
BufferedReader br = new BufferedReader (fr);
try
{
InputSource is = new InputSource (br);
parser.parse(is);
}
finally
{
br.close();
}