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?
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 www.website.com
DA1.1_Shares EDITED.xml (2.1 KB)
It’s necessary to consider XML namespace. Can you try the following sample?
Sample20231115-1.zip (3.7 KB)
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.
Thanks again Yoichi. You are the best!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.