In the xml document below, I would like to check for 3 things
1. If Phone/@Current ='true'
2. If Type/@Word ='HOME'
3. If Invalid is not true
I have done 1 and 2 but I am not sure how to do 3 in the same line of code.
My xml document which is put into an object objxmlPhoneNode
I have taken care of condition number 1 and 2. I need hep to add condition 3. i.e. If Invalid is not true.
1. If Phone/@Current ='true'
2. If Type/@Word ='HOME'
3. If Invalid is not true
I have done 1 and 2 but I am not sure how to do 3 in the same line of code.
My xml document which is put into an object objxmlPhoneNode
XML:
<?xml version="1.0" encoding="UTF-8"?>
<Phone Op="A" Current="true">
<Type Op="A" Word="HOME">Home</Type>
<Number Op="A">444-081-7031</Number>
<Invalid>true</Invalid>
</Phone>
I have taken care of condition number 1 and 2. I need hep to add condition 3. i.e. If Invalid is not true.
Code:
objxmlPhoneNode = objXmlPartyNode.SelectSingleNode("Phone[@Current='true' and Type/@Word='HOME']")