- Interpret xml string representation in order to dump over the class content.
- DTD validation is used in the same way that #loadXML does.
- \param xmlString XML string representation with relevant information for this instance
- */
- void fromXMLString(const std::string &xmlString) throw(anna::RuntimeException);
-
- /**
- Loads an xml file based on this message DTD (could be accumulative, no initialization will be performed by this method).
-
- <pre>
- <!ELEMENT message (avp*)>
- <!ELEMENT avp (avp*)>
-
- <!ATTLIST message version CDATA #IMPLIED name CDATA #IMPLIED code CDATA #IMPLIED flags CDATA #IMPLIED application-id CDATA #REQUIRED hop-by-hop-id CDATA #IMPLIED end-by-end-id CDATA #IMPLIED>
- <!--
- version: Diameter version. Sets '1' by default
- name: Command name within working stack (dictionary identifier)
-
- In order to get more coding capabilities, command code and flags could be established instead of former command name,
- but neither of them are allowed if 'name' is provided (and vice versa):
-
- code: Command code
- flags: Command flags byte value (0-255) where standard bit set for flags is 'RPET rrrr': (R)equest, (P)roxiable, (E)rror, Potentially re-(T)ransmitted message and (r)eserved
-
-
- application-id: Message application id
- hop-by-hop-id: Message hop by hop id. Sets '0' by default
- end-by-end-id: Message end by end id. Sets '0' by default
- -->
-
- <!ATTLIST avp name CDATA #IMPLIED code CDATA #IMPLIED vendor-code CDATA #IMPLIED flags CDATA #IMPLIED data CDATA #IMPLIED hex-data CDATA #IMPLIED>
- <!--
- name: Avp name within working stack (dictionary identifier)
-
- In order to get more coding capabilities, avp code, vendor-id and flags could be established instead of former avp name,
- but neither of them are allowed if 'name' is provided (and vice versa):
-
- code: Avp code
- vendor-code: Avp vendor code
- flags: Avp flags byte value (0-255) where standard bit set for flags is 'VMPr rrrr': (V)endor-specific, (M)andatory, end to end encry(P)tion and r(eserved)
-
-
- data: Natural string representation for avp data. Specially applicable with numbers and printable strings, but also
- useful for certain formats which could be easily understandable in such friendly/smart representation. We will
- achieve different human-readable strings depending on data format:
-
- [ OctetString ] (if printable, but not recommended)
- [ Integer32, Integer64, Unsigned32, Unsigned64, Float32, Float64 ] (normal number representation)
- [ Time ] (NTP timestamp, normal number representation)
- [ Address ] (auto detects IPv4 or IPv6 address version, then only ip address is specified: IPv4 with dots, IPv6 with colons)
- [ UTF8String, DiameterIdentity, DiameterURI ] (printable)
- [ IPFilterRule, QoSFilterRule ] (uses ASCII charset, printable)
-
- New application formats must define specific natural representation for internal raw data
-
- hex-data: Hexadecimal octet sequence representation (i.e. 'af012fb3', with even number of digits). Suitable for whatever kind
- of diameter format, but mandatory for non printable information. OctetString usually transport non human-readable
- data and should better be encoded within this field although being printable. Unknown avps (which fails identifying
- provided name or code/vendor-code) must always use this representation.
-
- Xml representation for decoded messages shows natural content except for 'OctetString' format and unknown avps. Anyway, when printable,
- OctetString could show such information at data field apart from hex-data, because many implementations use this format to transport
- readable-string data. In general, one of the data fields is mandatory except for 'Grouped' type (its data is another level of avps).
- Application-specific formats must decide the way to represent its contents, being recommended to use a natural representation if possible,
- because xml is read by humans with testing and monitoring purposes.
- -->
- </pre>
-
- @param xmlPathFile Complete path file to the xml document which represents the diameter message
- @see fromXMLString
- */
- void loadXML(const std::string & xmlPathFile) throw(anna::RuntimeException);
-