Take for example the following prototype XML layout
<records><record><valuea>foo1</valuea><valueb>bar1</valueb><valuec>bob1</valuec></record><record><valuea>foo2</valuea><valueb>bar2</valueb><valuec>bob2</valuec></record><record><valuea>foo3</valuea><valueb>bar3</valueb><valuec>bob3</valuec></record></records>
So I am using a call to .SelectNodes("//records/record") and iterating through within a For Each within the returned list.
The iteration loop count is correct.
Then I make a call to .SelectSingleNode("//records/record/valueb")
For some reason I always get the first record instance. The object the For Each has received as the iteration valuable contains the correct values, but somehow making the call .SelectSingleNode against it to obtain the specific value the program needs retrieves
the always the first record's valueb. The new object the For Each returns seems to have knowledge it is actually part of a larger set of data... not the individual record from the record set.
How can I correctly iterate through the record list and obtain each distinct record's valueb?
I am coding in Access / VBA.
TIA!
Michael Lueck - Lueck Data Systems - http://www.lueckdatasystems.com/ - My Blog