Problem getting values xml soap (Details)

I’m spending hours on how to get “CurrentBalance” data from SSvcFinancialInfoZoneDetails in below script:

<?xml version="1.0" ?>

<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/”>
<soapenv:Body >





i have added XNameSpace and can get all details from Zone but not from SSvcFinancialInfoZoneDetails
Please help
new 2.xml (666 Bytes)

Hi @kasmosh

To extract data from an XML file in UiPath, you can use one of the following approaches:

  1. Use the Read Text File activity to read the XML file as a text file, and then use a String manipulation activity to parse the data.
  2. Use the XML activities to parse the data. To do this, you will need to first use the Read Text File activity to read the XML file as a text file, and then use the Load XML activity to load the file into an XMLDocument variable. You can then use the Select Nodes activity to select the nodes you want to extract data from, and use the For Each activity to loop through the nodes and extract the data using the Get Attribute Value activity.

(Or)

  1. Use the Read Text File activity to read the XML file as a text file, and then use a String manipulation activity to parse the data.
  2. Use regex function to extract the value

Regards,
Kaviyarasu N

Hi @Kaviyarasu_N ,
Thanks but this script is SOAP api response not an regular xml. I can not use the same method

@kasmosh

Please check this for detailed explanation on how to extract xml data

Cheers

Hi @kasmosh
The output is which format? if its in string means you can extract the data with regex function if not try to convert into string and above method.
If not works please share output results with datatype

Regards,
Kaviyarasu N

xDoc.Descendants(NS2+“SSvcFinancialInfoZoneDetails”).First().Attribute(“CurrentBalance”).Value

(NS2 = “http://splwg.com/SSvcFinancialInfoZone.xsd” ) as xNameSpace
Result:
“Current Balance $-17.76”

Thank you so much

1 Like

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