I am reading in an XML file that contains a test result set that looks like this:
<?xml version="1.0"?> <testsuite> <build> <run> <test> <index>1</index> <id>1</id> <description>Description 1</description> <result>Pass</result> </test> <test> <index>2</index> <id>2</id> <description>Description 2</description> <result>Aborted</result> </test> <test> <index>3</index> <id>3</id> <description>Description 3</description> <result>Dependency</result> </test> <test> <index>4</index> <id>4</id> <description>Description 4</description> <result>Failed</result> </test> </run> </build> </testsuite>
I can successfully get the list of nodes using the following:
strQuery = "/testsuite/build/run/test/ (id|result)" Set nodeslist = xmlDoc.selectNodes(strQuery)
And I know that for each cycle, use node values ββfor each cycle ...
For Each objNode In nodeslist 'WHAT TO DO IN HERE... Next
However, I am now stuck at the point where I need to use the identifier and the result associated with it. In fact, I take this information and load the result into the test system, but for now I am fixated on how to scroll through 4 separate test nodes and select an identifier and result for each of them, ensuring that they remain connected to each other, etc. e. if they should be assigned to variables like ID and RESULT, which then I could perform my load action before you go back and reassign them to the values ββin the next node test.
Any help is greatly appreciated.
source share