Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   problem in deleting a node from an xml file (http://www.velocityreviews.com/forums/t168991-problem-in-deleting-a-node-from-an-xml-file.html)

Sumeeta. 03-17-2005 06:42 AM

problem in deleting a node from an xml file
 
Hi,

Am new to xml, using the xercess c++ DOM parser .
I want to delete a node from the xml file. Have used th removeChild()
method...but nothin happens.. not even errors..
it executes but doesnt remove any node from the file.

here's the code snippet (that's after parsing and loadin the xml file)
DOMNode *root = pDoc1->getDocumentElement();
DOMNode *child = root->getFirstChild();
DOMNode *nextchild = child->getNextSibling();
child->removeChild(nextchild);

other than the deleting part.. rest of the code works fine.

Cud aneone help please :)
Thanks.


Soren Kuula 03-17-2005 01:06 PM

Re: problem in deleting a node from an xml file
 
Sumeeta. wrote:
> Hi,
>
> Am new to xml, using the xercess c++ DOM parser .
> I want to delete a node from the xml file. Have used th removeChild()
> method...but nothin happens.. not even errors..
> it executes but doesnt remove any node from the file.
>
> here's the code snippet (that's after parsing and loadin the xml file)
> DOMNode *root = pDoc1->getDocumentElement();
> DOMNode *child = root->getFirstChild();
> DOMNode *nextchild = child->getNextSibling();
> child->removeChild(nextchild);


Maybe saving the results back into a file would help?

Soren



All times are GMT. The time now is 11:44 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.