problem in deleting a node from an xml file

Sumeeta.

Usenet Archive
Joined
Mar 17, 2005
Messages
1
Reaction score
0
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

Usenet Archive
Joined
Dec 14, 2003
Messages
168
Reaction score
0
Sumeeta. said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
548,050
Messages
3,104,249
Members
248,133
Latest member
DujonT

Latest Threads

Top