N
NachoShaw
Guest
Hi
further to my current task of collecting and processing XML data on this thread, i thought it best to start a new one as its not directly related.
In the XML, i have a series of node elements to iterate through. I do not need to maintain any grouping as all of the node values are to be placed in a single dataset. In total, there are 5 node elements containing sub datasets. The data needs to be collected and placed into a file as property values.
My first thought was to create a dynamic array and populate that with the various sets and then loop the array at the end to get the data out but that would make for multiple loop processes, A loop for each element iterating the xml nodes to populate the array and then the loop to get all of the collated data out to process into the properties. The other way i thought of was to loop each node element and process into properties directly but again, multiple loops. Seeing as i know the names of the Node Elements, should i just loop them individually or is there a better way? Is there a way to loop through the xml once but collect any node values base on a determined Node Element name? There is the GetElementsByTagName but im not sure how to implement that multiple times in a single loop or even if it can?
I'll look into it in the meantime but if any xml gurus could offer some suggestions, that would be awesome
Thanks
Nacho
Nacho is the derivative of Nigel - True fact! I am self taught in VB.Net. 50% of the time, I am right 100% of the time!
Continue reading...
further to my current task of collecting and processing XML data on this thread, i thought it best to start a new one as its not directly related.
In the XML, i have a series of node elements to iterate through. I do not need to maintain any grouping as all of the node values are to be placed in a single dataset. In total, there are 5 node elements containing sub datasets. The data needs to be collected and placed into a file as property values.
My first thought was to create a dynamic array and populate that with the various sets and then loop the array at the end to get the data out but that would make for multiple loop processes, A loop for each element iterating the xml nodes to populate the array and then the loop to get all of the collated data out to process into the properties. The other way i thought of was to loop each node element and process into properties directly but again, multiple loops. Seeing as i know the names of the Node Elements, should i just loop them individually or is there a better way? Is there a way to loop through the xml once but collect any node values base on a determined Node Element name? There is the GetElementsByTagName but im not sure how to implement that multiple times in a single loop or even if it can?
I'll look into it in the meantime but if any xml gurus could offer some suggestions, that would be awesome
Thanks
Nacho
Nacho is the derivative of Nigel - True fact! I am self taught in VB.Net. 50% of the time, I am right 100% of the time!
Continue reading...