In order to fetch XML node value in UIpath I followed below steps.
I read the XML file using Read file utility .
Deserialized the XML using Deserialize XML activity.
in Execute Xpath activity I used the output variable of Deserialize XML as input and below given Xpath.
“Records-Set/record[A = ‘abc’][B=‘123’]/@Leadtime”
but while printing it to a msgbox It just prints below given string in the message box.
if I use below stateement in Assign activity I can fetch the value of all the attributes under element records as shown in the msgbox screenshot above but instead I just need the value of Leadtime and with a condition where A=“abc”
It’s not much in this particular example, but for deeply nested structures, starting from the root would get messy.
And as you figured out, wrapping your XPATH expression in the String() function returns the string value of the single node, for a parent element string() would return the string values of each of the child nodes.