Any Java projects doing this that spring to mind?
I’ve been using JXPath ( http://jakarta.apache.org/commons/jxpath/ ) for
that purpose two years ago.
The org.apache.commons.jxpath package defines a simple interpreter of an
expression language called XPath. JXPath applies XPath expressions to
graphs of objects of all kinds: JavaBeans, Maps, Servlet contexts, DOM
including mixtures thereof.
Consider this example:
Address address = (Address)JXPathContext.newContext(vendor).
This XPath expression is equvalent to the following Java code:
Address address = null;
Collection locations = vendor.getLocations();
Iterator it = locations.iterator();
Location location = (Location)it.next();
String zipCode = location.getAddress().getZipCode();
address = location.getAddress();