Hi,
Can anyone help on the “Execute XPath” - “XPathExpression”?
I’d like to obtain the value of element “cbc:ID” as shown below (in yellow):
The challenges here are:
- All elements are tagged with namespace (See attachement)
- Semi-dynamic structure. The main tree structure does not change largely, however small change may occur. For instance the element “cac:Party” maybe gone. And “cac:Contact” becomes the direct child of “cac:AccountingCustomerParty”
I’ve tried many suggestions such as:
- xElement.Descendants.Where(function(n)n.Name.LocalName = “ID”).value
-
- However, it will not solve issue when there are multiple element “ID” from the same xml doc)
- The UiPath official web where sample XPathExpression is “string(/ele1/ele2/…/text()[1])”
-
- When I add the namespace in the path. Error prompts “Execute XPath: … has an invalid token”
BR
Helliton
Dummy Invoice.xml (982 Bytes)