Thanks,
<quote>The
node will be actually removed from memory when the LXMLDoc object will
be deleted.</quote>
Does this mean that the removed node will be present in
LNodeFileAddedElement even after i do this
LNodeFileAddedElement->removeChild(LNodeAddedFileList->item(1));
???
Will the node be present if i start processing LNodeFileAddedElement
again???

On 3/17/08, Alberto Massari <[EMAIL PROTECTED]> wrote:
>
> harshabi wrote:
> > 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..
> >
> First of all, item(2) retrieves the third "Path" item, not the second
> one. If you want to remove that node from the DOM tree, you can use
> LNodeFileAddedElement->removeChild(LNodeAddedFileList->item(1)). The
> node will be actually removed from memory when the LXMLDoc object will
> be deleted.
>
> Alberto
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Regards
Sree Harsha Vardhana S.N
"When you want something, all the universe conspires in helping you to
achieve it."

Reply via email to