try {
parser = parserFactory.newSAXParser();
} catch (ParserConfigurationException ex) {
throw new ConfigParseException(0, "Cannot configure XML parser.", ex);
} catch (SAXException ex) {
throw new ConfigParseException(0, "Cannot create XML parser.", ex);
}
// parse it
try {
parser.parse(input, this);
} catch (SAXException ex) {
int line = 0;
if (this.ex != null) {
line = ((SAXParseException) ex).getLineNumber();
ex = this.ex;
}
throw new ConfigParseException(line, "Error parsing XML graph: " + ex.getMessage(), ex);
}
}