Null Pointer Exception When Search a Char Sequence in a string
<p>I am parsing an xml using DOM Parser. I get a doc and then from that doc i get a url. when i search through that url for a particular char sequence i receive a null pointer exception.
This is what i am doing:</p>

<pre><code>  Boolean var = false;
  String url = theElement.getChildNodes().item(5).getNodeValue();
    if (url.contains("-b-"))  // this throws exception
    {
      var = true;
    }
</code></pre>

<p>Please any suggestions...</p>
