Get second instance of Xpath element in XML

I need to get he second instance of an Xpath element. Using the Execute Xpath activity

<?xml version="1.0"?>
  <book id="bk101">
   <author>Gambardella, Matthew</author>
   <title>XML Developer's Guide</title>
 <book id="bk102">
   <author>Freeman, Paul</author>
   <title>Getting well soon</title>

This will return Gambardella, Matthew


But I need to return Freeman, Paul

I’ve tried




I’ve checked Uipath documentation

And this post

but neither explain how to get the second instance :frowning:

I have answered my own question :confounded:, it seems when I tried again the correct answer was

"string(/catalog/book [2]/author/text()[1])"

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.