storing xml document after editing



1/ First iam parsing the doc as below:

 DomParser parser( mConfFile,false );
                            if( parser )
                            {
                                        cout << "SUCCESS : FILE
PARSING IS SUCCESSFUL: " <<  endl ;
                                        r =
parser.get_document()->get_root_node();
                            }

2/ Then adding the elements some thing like below:

 for ( ;count < keys.size() ; count ++ )
                                    {
                                        element->add_child(
keys[count],mNbaNs );
                                        element->set_child_text( values[count]);
                                    }
3/ Then, iam saving as below:

                      xmlpp::Document* document = parser.get_document();
                                    if( document )
                                        document->write_to_file( mConfFile );


But, the save changes are not happening. At the same time there is no
error as well. Please let me know.

Santhosh


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]