document.DocumentElement.Attributes.Append(document.CreateAttribute("uuid")).Value = "12345"
Yeah, XmlDocument is a bit hard to modify, that's part of the reason why XDocument was invented. But it's the easiest to use XML serialization and work on objects.