Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

How do I add a condition to my vb.net code?

$
0
0
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

<?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. 

objxmlPhoneNode = objXmlPartyNode.SelectSingleNode("Phone[@Current='true' and Type/@Word='HOME']")


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>