I\'m using SimpleXML (Java) and I\'m trying to get a List of objects based on the value of one of the siblings of the list.
So, here\'s my XML:
link
element doesn't have its closing counterpart. The same applies for the description
el. I assume these are just typos./metadata/resources/resource/links/link[parent::links/preceding-sibling::ittype/text()=='Service_Links']
or much simpler version:
/metadata/resources/resource[ittype = 'Service_Links']/links/link