What's the best way to go about hashing an XML document in C#? I'd like to hash an XML document so that I can tell if it was manually changed from when it was generated. I'm not using this for security--it's OK if someone changes the XML, and changes the hash to match.
For example, I'd hash the child nodes of the root and store the hash as an attribute of the root:
<RootNode Hash="abc123">
<!-- Content to hash here -->
</RootNode>