Find Specific XML Node value

Contissi

Member
Joined
Apr 16, 2012
Messages
5
Programming Experience
Beginner
I am currently trying to read in and parse an XML string that looks similar to:

C#:
<?xml version="1.0" encoding="UTF-8"?>
<test version="1.1">
  <query id="1234534567">
    <queryName>getHistory</queryName>
    <inputParameters>
      <parameter>
        <parameterName>requestorId</parameterName>
        <parameterValue>1111</parameterValue>
      </parameter>
      <parameter>
        <parameterName>employeeNumber</parameterName>
        <parameterValue>1111</parameterValue>
      </parameter>
      <parameter>
        <parameterName>IDNumber</parameterName>
        <parameterValue>123456</parameterValue>
      </parameter>
    </inputParameters>
  </query>
</test>

Seeing that I do not have unique node names, is it possible to grab a specific node value and return its counterpart. What I mean is, is there a way to look for the parameterName with a value of IDNumber and return its corresponding parameterValue? I have been unsuccessful thus far... Any help would be greatly appreciated.
 
Back
Top Bottom