CMarkup AddNode Method
AddNode method is called to add a node after the main position. If there is no main position, the node is added as the last node under the current parent position element. After a node is successfully added, the main position points to the new node.
szText argument has a different purpose for the different types of nodes. For a Comment, this text is the text of the comment; for a Document Type, it is the entire DTD from beginning < to ending >; for a Processing Instruction, its the target (such as "xml"); for a Text or CDATA Section, its the text.
This example shows how to add a comment node.
CMarkup xml; xml.AddNode( CMarkup::MNT_COMMENT, "hello" );
See the Node Methods in CMarkup.