Removes the node from its current parent node (can be either a node or the document). The whole node will be removed from its parent- with all the child nodes. After calling this function the node handle can be appended to another node or document.
XmlAPI.bdh
XmlRemoveChild( in hNode : number ): boolean;
true if successful
false otherwise
Parameter | Description |
---|---|
hNode | XML node that will be deleted |
dcltrans transaction TMain var hDocument, hResult: number; begin hDocument := XmlCreateDocumentFromXml("<root><child1 attr1='avalue1'>childvalue1</child1>" "<child2 attr1= 'avalue2'>childvalue2</child2></root>"); hResult := XmlSelectSingleNode(hDocument, "/root/child2"); XmlRemoveChild(hResult); end TMain;