The Digester component of the Apache Commons subproject supports rules-based processing of arbitrary XML documents.

See the Package Description for the org.apache.commons.digester package for more information.