Did you try the xml units which come along with fpc (dom, xmlread, xmlwrite) or lazarus (laz2_dom, laz2_xmlread, laz2_xmlwrite)? In laz2_dom I see that the TDomNode has a function DetachChild. After detaching a child node it probably can be destroyed (just guessing...). As for replacing, there's a function ReplaceChild for sure. Just browse these units.
Under all circumstances I would try to stay away from the TurboPower units. I spent quite some time with their libraries, but I've never seen such poorly written code...