De-serializing XML (Soap response)

@Pradeep.Robot
Following up the communications from messages find some further starter help:

XML Namespaces can confuse sometimes. But with following it can be overcome and analysed. After deserializing into an XDoc following statement can be used for exploration in the watch Box / Immediate Box while debbuging:

grafik

playing with the index the element of interest can be checked if its dealing with any Namespace or not

with the LINQ XML methods we can use the Descendants(“SubCollection”).toList, but have to filter on the name attribute: selectClaims

iterating over all found SubCollections the same has to applied and can be done as following:

LINQ

item.Elements("Column").Where(Function (x) x.Attribute("name").Value.Equals("WQDF_BOT_ID")).First().Value

(relying on element position index is not recommended)

XPATH

item.XPathSelectElement("Column[@name='WQMS_MESSAGE_ID']").Value

finally following log is written:
grafik

ensure that following imports are present:
grafik

find starter help here:
kk.virags.xaml (8.2 KB)

Let us know your feedback

2 Likes