How to encrypt WHOLE an xml file using C#?
If I understand you question, you might start by looking at System.Security.Cryptography namespace in .Net, and in particular at the CryptoStream class.
Here's a link you might find useful:
http://stackoverflow.com/questions/202011/encrypt-decrypt-string-in-net
I know how to encrypt string. But I dunno how to encrypt an XML file, not only nodes - whole XML file.
If you mean how to encrypt the XML file within code and save it back to disk, you can read the XML file as simple text. In that form it is nothing but a long string. Use the method you are familiar with to encrypt it. Then save it back to disk as a standard binary file. Reverse that to decrypt the file.
If you just want to encrypt the file on the drive, in Windows you can do that from the file properties.