CMarkup SetElemContent Method

bool CMarkup::SetElemContent( MCD_CSTR szContent );

The SetElemContent method replaces the main position element's content with the markup in szContent. This is different from SetData which encodes any special markup characters in the data value.

See Subdocuments and Fragments of XML Documents.

SetElemContent is like AddSubDoc in that it deals with putting a markup string into the document. However, unlike a subdocument, content is not rooted with a single element, it may have multiple top level elements and/or be mixed content. Content is a markup "fragment" consisting of any XML you can find in between the start and end tags of an element such as is returned by GetElemContent.