bool CMarkup::RemoveElem();

When RemoveElem is used the element at the current main position (and all its child elements if any) is removed from the document. If there is no main position to remove, the method returns false and does not modify the CMarkup object.

Upon removal, the main position goes to the previous element or none (no main position) if the removed element was the first child of its parent. The fact that the main position becomes the previous element is so that the main position is correct for a subsequent call to FindElem.

This example shows how to remove all of the elements under the current parent position.

xml.ResetMainPos();
while ( xml.FindElem() )
  xml.RemoveElem();