Parses the given filename.
if (sSaxfactory == null) {
// TODO just create a single factory in CommonPlugin and reuse it
sSaxfactory = SAXParserFactory.newInstance();
sSaxfactory.setNamespaceAware(true);
}
Result result = new Result();
if (xmlnsUri != null && xmlnsUri.length() > 0) {
result.setXmlnsUri(xmlnsUri);
}
try {
SAXParser parser = sSaxfactory.newSAXParser();
XmlHandler handler = new XmlHandler(result);
parser.parse(new InputSource(new FileReader(osFilename)), handler);
} catch(ResultFoundException e) {
// XML handling was aborted because the required element was found.
// Simply return the result.
return result;
} catch (ParserConfigurationException e) {
} catch (SAXException e) {
} catch (FileNotFoundException e) {
} catch (IOException e) {
}
return null;