开发者

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");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜