Deserializing a XML help needed


This is my first time working with XML and I’m finding it very confusing.
I have a XML which i need to deserialize and interact with:

I’m reading and deserializing the XML through these activites:

However when I run this process, nothing is output:

I need to identify each lstdScrtyDisp element and then manipulate the elements within it (e.g. conver calcDate to a DateTime format and use it to calculate date data.)

Can anyone please help me out with what I’m doing wrong?


Which element do you want to extract? And can you share your xml as file?


Hi Yoichi,

I’ve attached the xml.
I’m wanting to extract every lstdScrtyDisp (or iterate through them using For Each) and use the elements within lstdScrtyDisp e.g. noOfShares.

For privacy i’ve amended the URLs to

DA1.1_Shares EDITED.xml (2.1 KB)

Thank you!


It’s necessary to consider XML namespace. Can you try the following sample?

Sample (3.7 KB)


1 Like

That works, thanks Yoichi. Your help is always invaluable, so thank you again.

If I wanted to invoke a decendant value of an element within lstdScrtyDisp e.g. noOfShares, would I use xDoc.Descendants(xns+“lstdScrtyDisp”).descendants(“noOfShares”)?

THis is my first time using XML and I’m finding it very confusing.


It’s also necessary to consider namespace as the following.



1 Like

Thanks again Yoichi. You are the best!

1 Like

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