nap0leon
asked on
Classic ASP XPath select parent node where child node has certain text
In Classic ASP I have an XML document loaded into a session variable session("ArrayOfInformatio n")
I have available to me the PartnerUid.
I need to find out:
1- Is there a node in the XML where the PartnerUid is what I am looking for
2- If there is such a node, I need the DsiplayName and the DirectoryName
If someone can point me to the appropriate XPATH so that I can run selectSingleNode on the "Information" node that contains the child node I am looking for, I can get to the two values I am looking for.
I have available to me the PartnerUid.
I need to find out:
1- Is there a node in the XML where the PartnerUid is what I am looking for
2- If there is such a node, I need the DsiplayName and the DirectoryName
If someone can point me to the appropriate XPATH so that I can run selectSingleNode on the "Information" node that contains the child node I am looking for, I can get to the two values I am looking for.
<ArrayOfInformation>
<Information>
<PartnerId>12345</PartnerId>
<Description>Description Here</Description>
<DirectoryName>Directory Name Here</DirectoryName>
<PartnerUid>54321</PartnerUid>
<DisplayName>Display Name Here</DisplayName>
</Information>
<Information>
<PartnerId>67890</PartnerId>
<Description>Description Here</Description>
<DirectoryName>Directory Name Here</DirectoryName>
<PartnerUid>098765</PartnerUid>
<DisplayName>Display Name Here</DisplayName>
</Information>
</ArrayOfInformation>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The posting "I went the XPath route" corresponds to my suggestion.
The posting "I went the XPath route" corresponds to my suggestion.
ASKER
objXML.selectSingleNode("/