Answering my own question, but hey, why not.
Turns out jxpath wasn't really doing it for me, but jaxen is a dream to work with, and this pattern is just absurdly useful in so many contexts. Now, given a node in my object tree, I can select other nodes and/or their values using lovely little xpath expressions, e.g.:
Code:
entity[@name='foo']/panel[field[@name='bar' and @value='bat']]
suitable for embedding in metadata, or run-time scripts written in javascript or python or whatever. The only thing I want now is the ability to implement predicate expression evaluation using hibernate filters so this stuff is super fast as well as crazy useful.
Has no one else ever experimented with this kind of thing?