* constructed XML tree to be the "backtrack" node.
* @exception Exception If error occurs.
*/
public void parseConfigFile(String fileName, Set<String> includedClasses,
boolean backtrackingElement) throws Exception {
XmlParser parser = new XmlParser();
BufferedReader br = new BufferedReader(new FileReader(fileName));
ConfigXmlHandler handler = new ConfigXmlHandler(_xmlTree, fileName,
includedClasses);
handler.addExcludedFiles(_excludedFiles);
parser.setHandler(handler);
try {
// This fails to parse gtLibrary because it goes into a loop,
// and causes a stack overflow, so we catch Throwable and
// throw an exception.
parser.parse(fileName, null, br);
} catch (Throwable throwable) {
throw new Exception("Failed to parse \"" + fileName + "\"",
throwable);
}
// Manually add a <group> element to the root of the tree.