bool CMarkup::InsertChildElem( MCD_CSTR szName, MCD_CSTR szData = NULL, int nFlags = 0 );
bool CMarkup::InsertChildElem( MCD_CSTR szName, int nValue, int nFlags = 0 );

The InsertChildElem method inserts the element before the current child position (see AddChildElem to put it after the child position). If there is no child position, the element is inserted as the first child element of the main position regardless of whether there are any child elements. Only call this method if there is at least a main position. After a child element is successfully added, the child position points to the new child element.

The data value is optional. If no data value or an empty string is specified, an empty child element is created. The method returns true if the child element is inserted successfully and the child position points to it. The main position is not affected by this method.