The XmlUtils class is both somewhat archaic and messy. Time and again I'm looking for elegant methods to create Xml documents. We should move to extension methods where necessary. This ticket is about creating the first extension methods to add elements and attributes and allow these methods to be chained. A pull request will follow.
Looks good, this method used in https://github.com/dnnsoftware/Dnn.Platform/commit/798bb36824c7698e60968219e33a72549a4938df.
Closing per code review by Ben