X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=RIC-E2-TERMINATION%2FBuildXml.h;fp=RIC-E2-TERMINATION%2FBuildXml.h;h=beca88ba9b733eca2c4d6c4f50283273cfd7969b;hb=b95f70ecd64b40c455cc4e68e62f60bf5fa49242;hp=fe6d757286ef17c134e21bcccb48b6fe2f682be2;hpb=0829b8b91c245c19a4eb7288f81c4da762184f28;p=ric-plt%2Fe2.git diff --git a/RIC-E2-TERMINATION/BuildXml.h b/RIC-E2-TERMINATION/BuildXml.h index fe6d757..beca88b 100644 --- a/RIC-E2-TERMINATION/BuildXml.h +++ b/RIC-E2-TERMINATION/BuildXml.h @@ -90,11 +90,18 @@ int buildXmlData(const string &messageName, const string &ieName, vector .child(messageName.c_str()) .child("protocolIEs") .children(ieName.c_str())) { - auto node = tool.child("id"); + // there can be many ieName entries in the messageName so we need only the ones that containes E2SM continers + auto node = tool.child("id"); // get the id to identify the type of the contained message + if (node.empty()) { + mdclog_write(MDCLOG_ERR, "Failed to find ID node in the XML. File %s, line %d", + __FILE__, __LINE__); + continue; + } 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();