Get datas from XML

Hi, i’m trying to get datas from an XML and put them in a Datatable (for each workers datas), but I got that error when I try to parse my XML : “Assign xeWorkers - xElements: Namespace prefix ‘wd’ is not defined.”
Test.xaml (92.2 KB)
TestResponseXML.xml (50.1 KB)

Attached is a test file xml and the workflow

Can someone help ? Struggling for a long time lol, thanks!

Hi @FrenchyRPA

Check out this thread. This will help you.

Regards

Hi, thanks for your reply.

I tried that already but In my case I need to do a loop through the XML so it’s a bit more difficult then this one

Did you check out this thread @FrenchyRPA

Hope this will help

Regards

Hi,

How about using basic method of XDocument class instead of XPath?

image

xeWorker = xmldeserialized.Descendants(xnsWD+"Worker_Data")

Regards,

XML Extraction - Handling Namespaces (Tableau, Soap, OASIS types) - Help / Community - UiPath Community Forum

Maybe I can try that, but how to get the data for each worker after that ? I’m trying but not working for now

Thanks

Hi,

Can you try to modify them one by one.

For example, next Assign will be as the following.

nameDetailsXE = ThisWorkerXE.Element(xnsWD+"Personal_Data").Element(xnsWD+"Name_Data").Element(xnsWD+"Legal_Name_Data").Element(xnsWD+"Name_Detail_Data")

name_WD = nameDetailsXE.Attribute(xnsWD+"Formatted_Name").value

Regards,

Ok I see now how to do it, thanks a lot i’m sorted for now!

1 Like

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