I’d like to know what is the optimal way to extract the value from the tag “decimal” from the following XML response:
My workflow is as follow:
HTTP Request → Output response to variable
Deserialize XML → Output to XDocument
Apologies if the solution is simple, I’ve been trying to access the different elements in the XML to get to the decimal value, but so far with no sucess.
as this XML is related to SOAP namespaces are defined for the elements and has to be handled.
Find some starter help here:
Setting up the quick prototype:
ElementNames to Extract - Prototype reduced set:
Read In XML
Retrieval of private contact element (mandatory use of the Namespace within the name)
iterating over the list of elmentnames (ExtractNames) and reading element value:
Find starter help here:
Zlotzky.xaml (6.3 KB)
I do feel that a XPath Approach is better for the retrieval
Setting up a NamespaceManager with a Config Datatable:
for the default namespace with empty prefix “def” is assigne as prefix
the retrieval is configured as another datatable (could also be externalize into an excel)
I did also for a deeper nested element for demo purpose
After all preperation it is iterating over the retrieval config and retrieves the specfied values. et voila:
So this …
In this video, I use HTTP Request and extract XML from response:
23:50 Deserialize XML
25:15 How to extract Data from XML Nodes
27:40 How to extract Data from XML Attributes
Thank you for the suggestions everyone, but because I only want to extract a single value and the response body is static, I ended up using a simple REGEX expression to obtain the value. It’s not optimal, but it works for now.
Once again, I appreciate the help!