*
* @param xmlPathFile Complete path file to the xml document which represents the diameter message
*/
- void loadXML(const std::string &xmlPathFile) throw(anna::RuntimeException);
+ void loadXMLFile(const std::string &xmlPathFile) throw(anna::RuntimeException);
/**
* Interpret a xml string in order to create a diameter message
for example, the pattern '<avp name="Framed-IP-Address" hex-data="0a[A-Fa-f0-9][A-Fa-f0-9]0a0a"/>'
matchs IP addresses for '10.x.10.10' where x = [0..255].
- Note that string pattern could also be generated via #loadXML and then #asXML, that is to say, you
+ Note that string pattern could also be generated via #loadXMLFile/#loadXMLString and then #asXML, thus, you
could get patterns through xml files which act as conditional triggers over message. In that case,
it is not possible to specify regular expressions within xml 'hex-data' fields because parser will fail
during hexadecimal read. Normally only printable 'data' fields are used for matching issues.
Then you could do:
anna::diameter::codec::Message patternMessage;
- patternMessage.loadXML("pattern.xml");
+ patternMessage.loadXMLFile("pattern.xml");
std::string pattern = patternMessage.getAvp("Subscription-Id")->getAvp("Subscription-Id-Type")->asXMLString();
// Former is '<avp name="Subscription-Id-Data" data="616[0-9]{6,6}"/>'
bool match = incomingMessage.isLike(pattern);