[Simple-support] Selection using XPath based on value of sibling
Brought to you by:
niallg
|
From: BRANDON J G. <Bra...@ut...> - 2012-10-08 22:00:59
|
New to Simple as well as complex xpath queries... hoping someone can help me out here... I initially posted this question on SO: http://stackoverflow.com/questions/12648363/xpath-simplexml-selection-of-child-based-on-value-of-childs-sibling Please review my question there for more detail, but essentially I want to do something like this: <xml> <metadata> <resources> <resource> <ittype>Service_Links</> <links> <link>...</> ... </links> ... @ElementList(entry="link", inline=true) @Path( "metadata/resources/resource[ittype='Service_Links']/links" ) public List<Link> links; That is, I'm hoping I can use annotations to target a collection (ie: 'links') based on the value of the collection's sibling (ie: 'ittype') I would really appreciate any guidance on this. ~Brandon |