XML Extraction - Handling Namespaces (Tableau, Soap, OASIS types)

Hello lovely UIPathers :slight_smile:
I am hoping someone can guide me towards how I can extract the restAPIVersion from this deserialized XML:

Tried just about everything I can think of without success & grateful for any pointers.
Thank you!

Welcome to the forum

you may have to handle XML namespaces

Have a look here

Maybe you can share the XML as text with us

Going ahead
Serializing the XML - output: xDoc | DataType: XDocument:

Checking if we have to handle XML namespaces

We do have:

Checking for some children:

Defining Namespace Variable

:bulb: In some cases, we can also do: Assign Activity - xnsDefault = xDoc.Root.Name.Namespace

Checkin the retrieval

xDoc.Descendants(xnsDefault + "productVersion")
 GetDescendants { [<productVersion build="456" xmlns="http://tableau.com/api">123</productVersion>] }
 xDoc.Descendants(xnsDefault + "productVersion").First().Value
 xDoc.Descendants(xnsDefault + "productVersion").First().Attribute("build").Value
 xDoc.Descendants(xnsDefault + "restApiVersion").First().Value

About Prototyping / RnD
we recommend to work within the immediate panel as we can check and prototype very fast
Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum


Thanks Peter!
Annoyingly I had squiggly brackets around the XNamespace until I read your solution.

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