W
Wade G
How do I use XmlDocument class to parse an xml file such
as the following - note the key issue is the number of
<stuff> elements is not fixed so if I use m_nodelist =
m_xmld.SelectNodes("/start/level/stuff") to process the
nodes they all run together and I can't separate them by
the <level> that they are at because the number of times
they appear at each level is not fixed:
<start>
<level>
<stuff>
<firstthing>foo</firstthing>
<nextthing>boo</nextthing>
<stuff>
<stuff>
<firstthing>foo</firstthing>
<nextthing>boo</nextthing>
<stuff>
<level>
<level>
<stuff>
<firstthing>blue</firstthing>
<nextthing>goo</nextthing>
</stuff>
</level
</start>
as the following - note the key issue is the number of
<stuff> elements is not fixed so if I use m_nodelist =
m_xmld.SelectNodes("/start/level/stuff") to process the
nodes they all run together and I can't separate them by
the <level> that they are at because the number of times
they appear at each level is not fixed:
<start>
<level>
<stuff>
<firstthing>foo</firstthing>
<nextthing>boo</nextthing>
<stuff>
<stuff>
<firstthing>foo</firstthing>
<nextthing>boo</nextthing>
<stuff>
<level>
<level>
<stuff>
<firstthing>blue</firstthing>
<nextthing>goo</nextthing>
</stuff>
</level
</start>