MCD_STR CMarkup::GetElemContent() const;

The GetElemContent method returns the main position element's markup content. Unlike GetData this returns the content as a markup string including child elements. This method is similar to GetSubDoc in that it returns a markup string except that it returns the "inner XML" between the start and end tag of the main position element rather than the "Outer XML" including the start and end tags. The corresponding method to set the content is SetElemContent.

See Subdocuments and Fragments of XML Documents.

<config>
  <diagnostics d="3">
    <file>C:\temp\a.txt</file>
  </diagnostics>
  <diagnostics d="7">
    <file>D:\temp\a.txt</file>
    <proxy usedefault="true"/>
  </diagnostics>
</config>
xml.FindElem( "/config/diagnostics[2]" );
str sSubDoc = xml.GetElemContent();

This code navigates to the second diagnostics element and GetElemContent() returns the following XML fragment:

    <file>D:\temp\a.txt</file>
    <proxy usedefault="true"/>