I have the following structure for my XML file and I am using the MSXML2 v6.0 library in VBA (Excel 2013).
<root>
<products>
<product>relational database</product>
<product>virtual machine</product>
</products>
</root>
When I examine the product
node, it says that the value is "relational database" (for the first node), but it also lists the childNode as "relational database". How is this possible?
I was hoping to be able to figure out programmatically whether or not I have reached the bottom of the node tree by seeing if there are more child nodes, but it seems that this is not possible if it's always self-referencing the current node as its own child (I noticed this only happens when the node has text in it. If it just has an attribute but no text, it shows childNodes as being empty).
Any ideas for why a node will count itself as its own child node when there is text for that node, but no actual sub-elements, as well as any way to actually determine when I've reached the end of the node tree?
No comments:
Post a Comment