De-serializing XML (Soap response)

I need to Deserialize the below XML…

<s:Envelope xmlns:xsd=“XML Schema” xmlns:xsi=“” xmlns:s=“”>






Need to get the BOT ID and the MESSAGE Id from every sub collection. Please help.

for processing the xml it is required to handle namespaces. have a look here for starter help
SOAP_SearchByIDType.xaml (6.3 KB)
test.xml (862 Bytes)

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:


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:


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

(relying on element position index is not recommended)



finally following log is written:

ensure that following imports are present:

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

Let us know your feedback


Thanks Peter for the solution, I will try and let you know if it works. Just wanted to know few things.

  1. The above is two way of doing this? like LinQ and Xpath? where can i learn about how to define such attributes with respect to LinQ and Xpath?
  2. I see that, the LINQ statement is based on the x.Attribute(“name”).Value.Equals(“selectClaims”)).ToList… What if some of the sub collections has the different value in the subcollection Names? Which means, sometimes what if it comes “InsertClaims” or “DeleteClaims” ?
  3. Is there any way where i can jus look in to the direct Xpath of the WQMS_MESSAGE_ID? for each subcollections?

Thanks again for taking your time on helping this out.

1: yes, there are alternates to implement the retrieval:
LINQ - XML - Tutorialspoint (e.g. for starting)
XPath Tutorial

2: then the filter expression / logic has to modified. For doing this the requirements has to reformulate as in a first step.

3: give a try on (Not sure If I got your question right)


Thank you so much peter.

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