VBA – Read different levels of XML

After the article here for VBA – Select a Single Node XML now I am writing an update from it, which shows how to loop through all the nodes that we are interested in and get data from them.

The XML is quite similar with the first one, but one level deeper – the clubs now have a coach, a manager and establishment year:

The idea is to put the club name on the console and the club data like this:

Using late binding and the Football.xml xml file, we start looping. The looping is quite normal, the only “hard” time is probably getting the named item “name” from the third child. This is actually 90% the reason why I wrote this article:

The whole code looks like this:

Well, this is it! The code compiles, the sun is shining outside and it is August!

Tagged with: , , ,