C# how to remove a signature from an xml file?
I have an XML file that is digitally signed. Is there an开发者_开发百科 easy way to remove this signature in C#?
I am assuming it has a <Signature>
Element
You can just remove it using Linq and Resave.
// Find the <Signature> Element
XElement signElement = doc.Descendants("Signature").FirstOrDefault<XElement>();
signElement.Remove();
doc.Save("NonSignedFile.xml");
精彩评论