// we start with the rule for the top-most (root) element
ruleStore.addRule(new Pattern("*/foo"), new NOPAction());
// Create a new Joran Interpreter and hand it our simple rule store.
Interpreter ji = new Interpreter(ruleStore);
// --------------------------+
// Add an implicit action. |
// --------------------------+
ji.addImplcitAction(new PrintMeImplicitAction());
// Create a SAX parser
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser saxParser = spf.newSAXParser();
// Parse the file given as the application's first argument and
// set the SAX ContentHandler to the Joran Interpreter we just created.
saxParser.parse(args[0], ji);
// The file has been parsed and interpreted. We now print any errors that
// might have occured.
List errorList = ji.getExecutionContext().getErrorList();
if (errorList.size() > 0) {
System.out.println("The following errors occured:");
for (int i = 0; i < errorList.size(); i++) {