So I don’t forget:
Adding a comment to an existing IXMLNode is simple, once you find out how:
var CommentNode: IXMLNode; begin CommentNode := ParentNode.OwnerDocument.CreateNode('comment text', ntComment); ParentNode.ChildNodes.Add(CommentNode);
This is documented in the DocWiki