X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=source%2Fdiameter%2Fcodec%2Ffunctions.cpp;h=fe0ee03fd895ef36a155de968c6c5d6bc33e359e;hp=93ee8e393e801c115bb067419f116c5208661f29;hb=57040efdece4ea1f4487608de3d1afbb9d1378c8;hpb=9be8dddda350c2a17febabfa31d5d392ff4870fb diff --git a/source/diameter/codec/functions.cpp b/source/diameter/codec/functions.cpp index 93ee8e3..fe0ee03 100644 --- a/source/diameter/codec/functions.cpp +++ b/source/diameter/codec/functions.cpp @@ -336,9 +336,15 @@ void anna::diameter::codec::functions::messageXmlDocumentFromXmlFile(anna::xml:: ); } -void anna::diameter::codec::functions::messageXmlDocumentFromXmlString(anna::xml::DocumentFile &xmlDocument, const std::string &xmlString) throw(anna::RuntimeException) { +void anna::diameter::codec::functions::messageXmlDocumentFromXmlString(anna::xml::DocumentMemory &xmlDocument, const std::string &xmlString) throw(anna::RuntimeException) { LOGDEBUG(anna::Logger::debug("Parsing diameter message from xml string representation into xml document", ANNA_FILE_LOCATION)); xmlDocument.initialize(xmlString.c_str()); - xmlDocument.parse(MessageDTDMemory); // Parsing: fail here if xml violates dtd - LOGDEBUG(anna::Logger::debug("Parsing OK from XML string representation", ANNA_FILE_LOCATION)); + const anna::xml::Node *rootNode = xmlDocument.parse(MessageDTDMemory); // Parsing: fail here if xml violates dtd + LOGDEBUG( + std::string trace = "Parsing OK from XML string representation '"; + trace += xmlString; + trace += "':\n"; + trace += anna::xml::Compiler().apply(rootNode); + anna::Logger::debug(trace, ANNA_FILE_LOCATION); + ); }