title: Checking for None value while parsing a XML
body: <p>I am parsing a XML file. I need to check for series_id field.
  But i am unable to find a condition where the value is not there. Tried None, len(has_series) = 0 but it never gives me a value. Even i tried to check for False and " ". But not able to validate the condition.</p>
  
  <p>My Snippet below</p>
  
  <pre><code>has_series = program.xpath('props/*[@title="Series_ID"]')
  if has_series is None:
      print "None Value"
  if len(has_series) ==0:
      print "Zero value"
  if has_series == False:
      series_id = "N"
  else:
      series_id = has_series[0].text
      print series_id
  </code></pre>
  
  <p>Part from the XML without has_series</p>
  
  <pre><code>&lt;para352 title="Series_ID"&gt;&lt;/para352&gt;
  </code></pre>
  
  <p>I need to find a check for no value. The output comes like this.</p>
  
  <pre><code>Processing: /tmp/rosh/dummy/30000000550321045_2019_10_22T19_49_13Z.xml
  
  
  Processing: /tmp/rosh/dummy/30000000550324403_2019_10_22T19_49_13Z.xml
  
  
  Processing: /tmp/rosh/dummy/30000000550324407_2019_10_22T19_49_13Z.xml
  
  
  Processing: /tmp/rosh/dummy/E30000001555205318_2019_10_09T12_19_38Z.xml
  XN016663
  Processing: /tmp/rosh/dummy/E30000001555205320_2019_10_09T12_19_38Z.xml
  XN016663
  Processing: /tmp/rosh/dummy/E30000001555332469_2019_10_09T12_19_38Z.xml
  XN016663
  </code></pre>
  
  <p>wherever the values are picked, script displays it properly. But i need to validate against a non value condition.</p>