xargon
November 21st, 2003, 05:02 PM
Hi everyone,
I have the following XML structure.
<ROOT>
<ELEMENT>
<Time>100</Time>
<MIN>500</MIN>
<MAX>500</MAX>
<RESULT>OK</RESULT>
<ERRORS>NO</ERRORS>
</ELEMENT>
<ELEMENT>
<Time>100</Time>
<RESULT>OK</RESULT>
<ERRORS>NO</ERRORS>
</ELEMENT>
Unfortunately, as you can see the guy who designed the XML did not make it consistent (all ELEMENT nodes do not have the same sub-nodes). However, I am only interested in the RESULT sub-node.
So, I use the XMLDataDocument class to step through the file.
My question is that when I step in the element node, how can I just take a look at the RESULT tag.
I tried using SelectNodes (//RESULT) and SelectSingleNode(), but it always seemed to search from the root node. I want it within the context of the present node.
Thanks for any help you can give me.
Sincerely,
Xargon
I have the following XML structure.
<ROOT>
<ELEMENT>
<Time>100</Time>
<MIN>500</MIN>
<MAX>500</MAX>
<RESULT>OK</RESULT>
<ERRORS>NO</ERRORS>
</ELEMENT>
<ELEMENT>
<Time>100</Time>
<RESULT>OK</RESULT>
<ERRORS>NO</ERRORS>
</ELEMENT>
Unfortunately, as you can see the guy who designed the XML did not make it consistent (all ELEMENT nodes do not have the same sub-nodes). However, I am only interested in the RESULT sub-node.
So, I use the XMLDataDocument class to step through the file.
My question is that when I step in the element node, how can I just take a look at the RESULT tag.
I tried using SelectNodes (//RESULT) and SelectSingleNode(), but it always seemed to search from the root node. I want it within the context of the present node.
Thanks for any help you can give me.
Sincerely,
Xargon