Forum Discussion
richie
4 years agoCommunity Hero
Hey JuliaZ-Williams
you reckon you need to differentiate between the two using the correct index value.
jsonpath starts with zero, but i think xpath starts with 1, so using the following as an example:
<Books>
<Book>
<Author>value1</Author
<Book/>
<Book>
<Author>value2</Author>
<Book/>
<Books/>
So including the index, the xpath to the first instance of 'Author' tag would be //Books/Book[1]/Author and xpath to the second instance of Author tag would be something like //Books/Book[2]/Author
OR thereabouts - it's been awhile since I was playing with xpath - just been focused on jsonpath for hte last couple of years.
ta
rich
Related Content
- 9 years agojbiss