views:

30

answers:

1

I would like to sign my XDocument XML document (to verify it later on). Is there any way to sign an XDocument or do you have to convert it to an XmlDocument?

http://www.west-wind.com/weblog/posts/257599.aspx

+2  A: 

Maybe you can use the SignedXml.LoadXml method to initialize a SignedXml with the XML from the XDocument, instead of from an XmlDocument.

Sjoerd
It wants an XmlElement only. I guess it's not possible?
Nate Zaugg
I agree. I must have been mistaken. It seems the SignedXml class only works with either XmlDocument or XmlElement. Of course, you can implement your own class to sign XDocuments, but it may be easier to convert it to an XmlDocument.
Sjoerd