I normally start by loading a template into XmlDocument and then manipulating it.
The big downside with using just StringBuilder is that you have to escape characters such as & and <. This ends up being more trouble than it's worth. The only time I would do that was if I was worried about resources and could dispense with XmlDocument altogether which only really happens on such things as mobile devices.
The third option of doing it completely within XmlDocument can have the merit of being easier to code sometimes, if your document is very repetitive; that doesn't look the case here and creating comments etc. can be tedious using just the DOM.
--
Joe (
Microsoft MVP - XML)