X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=source%2Fdiameter%2Fcodec%2FAvp.cpp;h=f0477e2acf5e626a50955a249390143d89e5bcbf;hp=7b075cf21c21df5ce690b17c6eee3ed674dc7049;hb=227446df961ead723c8f2b04ea53d99c770a438f;hpb=1fd0c19880f48fd5d98dfce81dfed21147b4dfe3 diff --git a/source/diameter/codec/Avp.cpp b/source/diameter/codec/Avp.cpp index 7b075cf..f0477e2 100644 --- a/source/diameter/codec/Avp.cpp +++ b/source/diameter/codec/Avp.cpp @@ -1648,9 +1648,11 @@ anna::xml::Node* Avp::asXML(anna::xml::Node* parent) const throw() { //------------------------------------------------------------------------------ //----------------------------------------------------------- Avp::asXMLString() //------------------------------------------------------------------------------ -std::string Avp::asXMLString() const throw() { +std::string Avp::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); }