Blog Stats
  • Posts - 15
  • Articles - 0
  • Comments - 2
  • Trackbacks - 6

 

Combining xpaths or running multiple search criteria

One of the less documented features of xpath is how to run multiple
search on nodes or attributes
e.g
<Book name="Harry Potter" price="10GBP"/>
<Book name="Harry Potter" price="5USD"/>
now if you want one of them following is xpath query

.//Book[@name="Harry Potter" and @price="10GBP"]
we can use or instead of and for 'OR'ing

Cheers

Vishy


Feedback

No comments posted yet.


Post a comment





 

 

 

Copyright © Vishal H