You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Sree Harsha <sr...@gmail.com> on 2008/03/17 12:45:00 UTC
Deleting a node in the memory...
Hello all,
How can i delete(Remove) a node in the memory?? should i use a DOMNodelist
or DOMElement...For example consider the following snippet...
xercesc::DOMDocument* LXMLDoc = Lparser_.getDocument() ;
xercesc::DOMNodeList*
LNodeAddedList=LXMLDoc->getElementsByTagName(XercesString("Added"));
xercesc::DOMNode* LNodeFileAddedElement=(DOMNode*)(LNodeAddedList->item(0));
xercesc::DOMNodeList*
LNodeAddedFileList=((DOMElement*)LNodeFileAddedElement)->getElementsByTagName(XercesString(
"Path"));
Let us say that i dont want the 2nd item in the LNodeAddedFileList (ie
LNodeAddedFileList->item(2)) how can i remove it??? will it affect the
DOMTree constructed (that is actually the effect i want)... Help me out with
this..
--
Regards
Sree Harsha Vardhana S.N