consider this
List of AlcoholBeer
<br>
Vodka
<br>
rum
<br>
whiskey
how would you express Beer in xpath ?
/br/preceding-sibling::text() ?
what about vodka ? rum ?
Depends on the context. Ideally, to be well-formed XML, your sequence needs a root element. Let's say it's <bar/>
.
Beer: /bar/br[1]/preceding-sibling::text()[1]
Vodka: /bar/br[1]/following-sibling::text()[1]
Rum: /bar/br[2]/following-sibling::text()[1]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With