CMarkup GetSubDoc Method
MCD_STR CMarkup::GetSubDoc() const;
The GetSubDoc method returns the main position element and any elements it contains as an XML document markup string.
It is like GetDoc because the returned string is an XML document of its own. It is different from GetData, which only gets the data content and no child elements. The GetSubDoc method returns an XML document in which the root element was the main position element in the source document. If you want the XML in between the start and end tags, see the GetElemContent method.
See Subdocuments and Fragments of XML Documents.
Here is an example document to illustrate subdocuments.
<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>
If the current main position is the first diagnostics element, GetSubDoc() returns the following subdocument.
<diagnostics d="3">
<file>C:\temp\a.txt</file>
</diagnostics>
