title: Calling method from catch method doesn't work
body: <p>I'm trying to call a method from a catch block but the xmlnode inside the method doesn't seem to work. I'm getting a null. If I call the same method from the try block it works.</p>
  
  <pre><code>var doc = new XmlDocument();
  
  try
  {
  
   doc.Load(f.FullPath);
  // do some work 
  
  }
  
   catch (Exception e)
   {
    if (e is XMLException)
    {
     checkXML(ref doc);
    }
  
  public void checkXML(ref XmlDocument doc)
              {
  
                  XmlNode xn = doc.SelectSingleNode("/BroadcastMonitor/Current");
                  xn["name1"].InnerText = SecurityElement.Escape(xn["name1"].InnerText);
                  xn["name2"].InnerText = SecurityElement.Escape(xn["name2"].InnerText); ;
  
  
              }
  </code></pre>
  
  <p>Now when the catch block calls method 'checkXML', i get xn as null. But if I execute the same from the 'try' block just to check, 'xn' has a value. 'doc' too has a value regardless of when called try or from catch block.</p>
  
  <p>Why is this happening? Please help me understand.</p>
  
  <p><strong>EDIT</strong></p>
  
  <pre><code>&lt;BroadcastMonitor&gt;
  &lt;updated&gt;2014-10-17T07:56:30&lt;/updated&gt;
  &lt;Name&gt;TESTING&lt;/Name&gt;
  &lt;Current&gt;
  
      &lt;artistName&gt;اصاله&amp;  نصرى&lt;/artistName&gt;
      &lt;albumName&gt;شخصيه عنيده&lt;/albumName&gt;
      &lt;CategoryName&gt;ARABIC &amp; SONGS&lt;/CategoryName&gt;
  
  &lt;/Current&gt;
  &lt;/BroadcastMonitor&gt;
  </code></pre>
  
  <p>Thank you.</p>