- for (auto n : tool.child("value").child("RANfunctions-List").child(
- "ProtocolIE-SingleContainer").children()) {
-//ProtocolIE-SingleContainer
-//cout << "\t1 " << n.name() << endl;
- if (strcmp(n.name(), "value") == 0) {
- for (auto l : tool.child("value").children()) {
-//cout << "\t\t2 " << l.name() << endl;
- for (auto f : l.children()) {
-//cout << "\t\t\t3 " << f.name() << endl;
- for (auto g : f.child("value").children()) {
-//cout << "\t\t\t\t4 " << g.name() << endl;
- for (auto a : g.children()) {
- if (strcmp(a.name(), "ranFunctionDefinition") == 0) {
- if (repValues.size() > index) {
- a.remove_children();
- string val = repValues.at(index++);
-// here we get vector with counter
- a.append_child(pugi::node_pcdata).set_value(val.c_str());
-
- }
- }
-//cout << "\t\t\t\t\t5 " << a.name() << " " << a.child_value() << endl;
- }
- }
- }
+ auto node = tool.child("id");
+ if (strcmp(node.name(), "id") == 0 && strcmp(node.child_value(), "10") == 0) {
+ auto nodea = tool.child("value").
+ child("RANfunctions-List").
+ children("ProtocolIE-SingleContainer");
+ for (auto n1 : nodea) {
+ auto n2 = n1.child("value").child("RANfunction-Item").child("ranFunctionDefinition");
+ n2.remove_children();
+ string val = RANfunctionsAdded.at(index++);
+ // here we get vector with counter
+ n2.append_child(pugi::node_pcdata).set_value(val.c_str());
+ if (mdclog_level_get() >= MDCLOG_DEBUG) {
+ mdclog_write(MDCLOG_DEBUG, "entry %s Replaced with : %s", n2.name(), n2.child_value());