Contents Index Topic Contents | ||
Previous Topic: IXMLElement::addChild Next Topic: IXMLElementCollection::get_length |
IXMLElement::removeChild
HRESULT IXMLElement::removeChild( [in] IXMLElement *pChildElem)Removes a child of this element.
- Returns S_OK if successful.
- pChildElem
- Address of the child element that should be removed.
The element remains in memory and can be reattached to a tree by using IXMLElement::addChild. All the children and descendants of this child element remain attached as before. Any threads that have already traversed the tree and expect this element to have the old parent will fail unpredictably. It is possible to use this method to break off a subtree from one XML document and attach it to another XML document. However, there are restrictions as explained in IXMLElement::addChild.
The results when using the IXMLElementCollection::get_newEnum method from a collection obtained from this element (the parent) are undefined if the enumerator is not reset.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.