Extract Data From Deserialized XML file

Hey guys, i have touble extract data under , i use
xmlrez.Element(soapenv+“Envelope”).Element(soapenv+“Body”).Element(“CallBranchOut”).Element(“DataFromTFS”).Value and give the data below without error,

but when i try to move on to the data, i keep receiving error like ‘Assign: Object reference not set to an instance of an object.’


not sure which part goes wrong that con’t return the details

Hi @Ying_Zhu

Check out this blog


hi, i’ve checked but not sure what goes wrong in my code

Hi @Ying_Zhu

Have you checked this ?


From your input

we would assume, that a SOAP xml with typically defined XML Namespaces is to handle

The details / XML Namespace definitions we cannot derrive form your snippet. Also the xml snippet and the code snippet are not matching (Element Structures)

So we recommened:

Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum

feel free to share with us the XML as Textfile and let us know your detailed extraction needs

soap_xml.txt (1.6 KB)
Hi ppr, thanks for your help, txt file of xml from UiPath is attached, the detail data i need to extract is Status, DOCDATE1, DOCNUMBER1, DOCNUMBER2

<SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:SOAP-ENC=“http://schemas.xmlsoap.org/soap/encoding/”>

list R55U03B501_PXPKG SUCCESS YES pdf 14-81847883-1 2021-09-30 00:00:00 A OK SMOG REPAIR & REGISTRATION 46590 CALHOUN ST CUSTOMER FINANCIAL SERVICES 38729845 71277470 70018 R55U03B501_PXPKG ]]>


Please confirm that the shared XML is of this format:

escaped XML as values. If so, then we would first decode the value, parsing and Xml processing it.

Yeah the request is html encoded, but the result format within SoapUI looks fine, not sure why in UiPath the format changed.

Going ahead:

Name/ Namespace Check

So we can do a Quick Access:

Crosscheck returned Value

So when again Parsing the XML we can access:

It is about the handling the CDATA Part

But with a second Deserialize XML it can be handled as show cased above

hi thanks, but i’m not sure i fully understand, how do we do the second deserial xml here? sorry i’m pretty new to this

as shown we can do it on codel

Assign Activity:
xDoc2 | DataType: XDocument = xDocument.Parse(xDoc.Descendants("DataFromTFS").First().Value)


Or you are using a second Deserialize XML Activity

xDoc is the outcome from the first Deserialize XML

got it, thank you so much

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