commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wannheden, Knut" <>
Subject [jxpath] context with root and local object
Date Thu, 01 May 2003 09:03:56 GMT

Is it be possible to create a JXPathContext which both has a root object and
a local context object?  Consider this document (or equivalent bean

 <entry name="foo">
  <phone-number type="home" number="123"/>
 <entry name="bar">
  <phone-number type="work" number="456"/>
  <phone-number type="cell" number="789"/>

Now I think it would be nice if I could create a JXPathContext with the root
element <address-book/> as root object and for instance <entry name="foo"/>
as local context object.  These paths would return all <entry/> elements:


And this relative path would return all <phone-number/> elements of the
local context object:


Is this currently possible or doesn't it make any sense at all?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message