xpath to get immediate following element -
i'm writing xpath in "title" element want following "abbrev" within same parent(feature). i'm using xpath 1.0
<root> <feature> <title>burst cycle length</title> <titlealts class="- topic/titlealts "> <navtitle>burst cycle length</navtitle> </titlealts> <abbrv>bcl</abbrv> <featbody/> </feature> <feature> <title>burst parameter</title> <titlealts class="- topic/titlealts "> <navtitle>burst cycle length</navtitle> </titlealts> <abbrv>bcp</abbrv> <featbody/> </feature> </root>
if want nodes:
/root/feature/title/following-sibling::abbrv
or, if want specific one:
/root/feature/title[.='burst cycle length']/following-sibling::abbrv
this has same output preceding:
/root/feature[1]/title/following-sibling::abbrv
Comments
Post a Comment