X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=source%2Fdiameter%2Fcodec%2FMessage.cpp;h=0cf70cd31a66e81323da9160b4b2d70123f4019b;hp=31b7d14a6f2f67127d42ca327f9c5a8b2d372aec;hb=227446df961ead723c8f2b04ea53d99c770a438f;hpb=1fd0c19880f48fd5d98dfce81dfed21147b4dfe3 diff --git a/source/diameter/codec/Message.cpp b/source/diameter/codec/Message.cpp index 31b7d14..0cf70cd 100644 --- a/source/diameter/codec/Message.cpp +++ b/source/diameter/codec/Message.cpp @@ -998,9 +998,11 @@ anna::xml::Node* Message::asXML(anna::xml::Node* parent) const throw() { //------------------------------------------------------------------------------ //------------------------------------------------------- Message::asXMLString() //------------------------------------------------------------------------------ -std::string Message::asXMLString() const throw() { +std::string Message::asXMLString(bool sortAttributes) const throw() { anna::xml::Node root("root"); - return anna::xml::Compiler().apply(asXML(&root)); + + anna::xml::Compiler::Mode::_v mode = sortAttributes ? anna::xml::Compiler::Mode::Sort : anna::xml::Compiler::Mode::Visual; + return anna::xml::Compiler().apply(asXML(&root), mode); }