The code example in this procedure demonstrates how to digitally sign an entire XML document with Powershell and attach the signature to the document in a <Signature> element.
The example creates an RSA signing key, and adds the key to a "non persistent" container.
After this, we verify the signatur on a example xml