title: How to check whether a node exists or not using powershell without getting exception?
body: <p>I am trying to check whether a particular node exists or not like follows.</p>
  
  <p>In my config file there is a node named client ,it may or may not available.</p>
  
  <p>If it is not available i have to add it.</p>
  
  <pre><code>    $xmldata = [xml](Get-Content $webConfig)    
  
          $xpath="//configuration/system.serviceModel"    
          $FullSearchStr= Select-XML -XML $xmldata -XPath $xpath
  
  If ( $FullSearchStr -ne $null) {  
  
          #Add client node
          $client = $xmldata.CreateElement('Client')
          $client.set_InnerXML("$ClientNode")
          $xmldata.configuration."system.serviceModel".AppendChild($client) 
          $xmldata.Save($webConfig) 
  
      }
  </code></pre>
  
  <p>The condition i am checking may return array. </p>
  
  <p>i would like to check whether the client node available before or not?</p>