title: Can't read/find node in signed XML file using c#
body: <pre><code>String fileName = "signed_file.xml";
        String filecopy = "signed_file_copy.xml";
  
  
         File.Copy(fileName, filecopy, true);
  
          /* Remove the digital signature */
          XDocument doc1 = XDocument.Load(filecopy);
  
          XElement signElement = doc1.Descendants("Signature").FirstOrDefault&lt;XElement&gt;();
  
          signElement.Remove();
  </code></pre>
  
  <p>signElement is null, even though signed_file_copy.xml has the 
  Signature tag in it. Need help to understand what is going on.</p>
  
  <p>The Signature tag structure in XML looks like below</p>
  
  <pre><code>&lt;Config&gt;
  &lt;Signature xmlns="http://www.w3.org/2000/09/xmldsig#"&gt;
   &lt;SignedInfo&gt;
    &lt;CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" /&gt; 
    &lt;SignatureMethod Algorithm=xxxxxxxxx /&gt; 
    &lt;Reference URI=""&gt;
    &lt;Transforms&gt;
    &lt;Transform Algorithm=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz /&gt; 
    &lt;/Transforms&gt;
    &lt;DigestMethod Algorithm=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy /&gt; 
    &lt;DigestValue&gt; xxxxxxxxxxx &lt;/DigestValue&gt; 
    &lt;/Reference&gt;
    &lt;/SignedInfo&gt;
    &lt;SignatureValue&gt;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&lt;/SignatureValue&gt; 
  &lt;/Signature&gt;
  &lt;/Config&gt;
  </code></pre>