I’m trying to learn how to read and iterate though XML data using .element and .attribute and then for each loops e.g trying things like ‘XMLData(my variable).Element(“data”).Element(“columns”).Attribute(“Age”).ToString’
but I’ve noticed the XML data is set up slightly differently to what I’ve seen in that it has columns information then records (as opposed to ‘just records’.) So I’m guessing I could reference the ‘desired column index’ to get the info I need but I’m not sure how to do this.
Appreciate it’s a big ask but could anybody please guide me on what I would write to get specific data like a persons first and last name or their country.
Thank you so much for this. Runs really well and plenty for me to learn from. I’m going to see if I can split the data for each person (for example ‘38Canada15/10/2017DulceFemale15522Abril’) in to it’s constituent parts and put it all in an array or datatable, something like that under the correct column headings. Please can I ask, would you recommend the best way to do this is to split the records up in to an array then add them to a datatable with the column headers already set? or would you approach this a different way?
My colleague helped me look at the XML xaml you’d kindly built for me and had a play around with it. Here is the output which gets the data and puts it in to a datatable ready for an excel file, just in case you want to take a look
It helps the forum users if any one wants to do the same…
The thing is, as per the forum rules, we are not supposed to provide the workflows as a solution. But explaining the design of a XML workflow is difficult. So, i added the workflow but writing it to an excel is an easy thing. So, I just guided you to do that