>Do any rules exist that will execute if an unexpected element or attribute
>is encountered in an XML file.
>
>
You are looking for something other than the standard schema validation,
right? Here's what I did:
digester.setRules(new ExtendedBaseRules());
// add all your normal rules here
digester.addRule("*/?", new Rule() {
public void begin(java.lang.String namespace,
java.lang.String name, org.xml.sax.Attributes attributes)
throws Exception{
throw new Exception("Unknown tag " + name);
}
});
This is like the "default" tag in a "case" statement, that only fires if
none of the other conditions match.
Bill
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org