users@jaxb.java.net

Re: JAXB generated Java Model + JXPath

From: Dmitri Colebatch <colebatchd_at_gmail.com>
Date: Thu, 4 Aug 2005 19:39:32 +1000

On 8/4/05, Aleksei Valikov <valikov_at_gmx.net> wrote:
> > But more straightforward queries would be very doable I would think -
> > wouldn't even need to be a JAXB plugin, just use the same annotations.
>
> Well, I'm not sure.

Maybe I'm oversimplifying it, but I would imagine that you might be
able to do something like this:

Object select(Object context, String xpath)
{
  // get context jaxb annotations
  // get first part of xpath
  // look for match
  // if match found, call select with the match, and the remaining xpath
}

Obviously that only handles the /foo/bar scenario, but adding simple
predicates wouldn't be too hard, and I imagine those two would give
most people the functionality they're after.

cheers
dim