How to traverse to the 2nd table row data of the XML document to get the specified value

Hi,

I am trying to extract data from the XML document which is a data of an Invoice copy. I need to get the 2nd row line item data. I know the way interms of code level. But want to know the syntax for UiPath.

In code level its

“/Batches/Batch/Documents/Document/Tables/Table/TableRows/TableRow[2]/ItemFields/ItemField[1]/Text”

But in UiPath I am not able to enter the Index for TableRow as TableRow(2) or TableRow[2].
Reference UiPath Code :
OutXMlData.Element(“Batches”).Element(“Batch”).Element(“Documents”).Element(“Document”).Element(“Tables”).Element(“Table”).Element(“TableRows”).Element(“TableRow”).Element(“ItemFields”).Elements(“ItemField”)

Could you kindly help me on this to extract “Micro-gear Controllers” from XML document.

Sharing the XML document for reference.

Test.xml (20.4 KB)

@veerish_uppin1
Welcome to the forum:

Option 1: Xpath:

Ensure:
grafik

Option 2:

We are 0 based, so we corrected the indexes

Option 3: Shortened with some path hoppings
grafik

similar to:
grafik

image

I am using the for each loop.

please elaborate more on your question.

we took above question for the answer and used the given XPath

How do I put the same in UiPath

it was done in UiPath

so the samples can be used within the different activities and its properties/fields

Please give us more complete details on your focused case if further assistance is needed. Thanks for support