XPath for choosing a sibling after

Biamesash

New Member
I've got following xml:\[code\]<root> <a>value1</a> <b>value2</b> <c>value3</c> <a>value5</a> <d>value4</d> <b>value2</b> <b>value3</b> <a>value7</a></root>\[/code\]I want to select the first sibling \[code\]a\[/code\] after node \[code\]//b[text()='value2']\[/code\] if it's not followed by an other b-node (in this case it will be \[code\]<a>value5</a>\[/code\], \[code\]<a>value7</a>\[/code\] should not be selected).What's the xpath to do that?I'm using .net 4 and xpath 1.0
 
Back
Top