Hello,
I have an xml file. It is quite big, but the pattern is repetitive. I am having trouble extracting values from the XML file using XMLDOM.

XML file:
<html>
<body>
<table border="0" cellspacing="0" cellpadding="0" width="100%" class="yfnc_datamodoutline1">
<tr valign="top">
<td>-
<table border="0" cellspacing="1" cellpadding="2" width="100%">
<tr>
<th width="16%" class="yfnc_tablehead1" align="right" scope="col">Date</th>
<th width="12%" class="yfnc_tablehead1" align="right" scope="col">Open</th>
<th width="12%" class="yfnc_tablehead1" align="right" scope="col">High</th>
<th width="12%" class="yfnc_tablehead1" align="right" scope="col">Low</th>
<th width="12%" class="yfnc_tablehead1" align="right" scope="col">Close</th>
<th width="16%" class="yfnc_tablehead1" align="right" scope="col">Volume</th>
<th width="15%" class="yfnc_tablehead1" align="right" scope="col">Adj Close* </th></tr>-
<tr>
<td class="yfnc_tabledata1" align="right">May 12, 2011</td>
<td class="yfnc_tabledata1" align="right">12,629.81</td>
<td class="yfnc_tabledata1" align="right">12,746.09</td>
<td class="yfnc_tabledata1" align="right">12,497.97</td>
<td class="yfnc_tabledata1" align="right">12,695.92</td>
<td class="yfnc_tabledata1" align="right">3,777,210,000</td>
<td class="yfnc_tabledata1" align="right">12,695.92</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>


oXML.Load ("C:\Users\Sai\Desktop\newstockdata.xml")
Set oXMLNodes = oXML.SelectNodes("/html/body/table/tr/td/table/tr")
For Each oXMLNode In oXMLNodes
Debug.Print oXMLNode.NodeText
Next

I felt this should print the value of one <th> tag per iteration, but it concatenates the text of all <th> tags and prints it as one string. And in the next iteration, it concatenates the text of all <td> tags of the next <tr> tag and prints it as one string and so on.

I am pasting a sample of the first two iterations below:

1st iteration:DateOpenHighLowCloseVolumeAdj Close*
2nd iteration:May 12, 201112,629.8112,746.0912,497.9712,695.923,777,210,00012,695.92

Kindly explain where I am going wrong and also point out how I should tweak the above lines of code so that I get to print the text of one <th> tag per iteration.