Xpath Query to match immediate sibling nodes in a sequence.
- by Pritam Damania
Hi,
I'm new to XPATH and I'd like to know if there is a nice way to do this using XPATH queries.
I want to match consecutive sibling nodes in a XML tree to certain predefined rules for example if there are three sibling nodes occurring immediately one after the other and they have the attributes value="A", value="B" and value="C", I want the XPATH query to match the first node/last node in such a sequence and I want to extract all such consecutive sequence of nodes from the XML tree so that I can process them later on.
Thanks!