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

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