From 0061298dd0945f7f67e7fa340c6649b179c804d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Thu, 10 Mar 2022 23:23:47 +0100 Subject: Do not use ':' as a namespace separator with expat Instead use \1, and build our own nodes by explicitely separating the namespace and the node name. --- src/xmpp/xmpp_stanza.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/xmpp/xmpp_stanza.hpp') diff --git a/src/xmpp/xmpp_stanza.hpp b/src/xmpp/xmpp_stanza.hpp index f4b3948..a706337 100644 --- a/src/xmpp/xmpp_stanza.hpp +++ b/src/xmpp/xmpp_stanza.hpp @@ -25,6 +25,8 @@ class XmlNode public: explicit XmlNode(const std::string& name, XmlNode* parent); explicit XmlNode(const std::string& name); + explicit XmlNode(const std::string& xmlns, const std::string& name, XmlNode* parent); + explicit XmlNode(const std::string& xmlns, const std::string& name); /** * The copy constructor does not copy the parent attribute. The children * nodes are all copied recursively. @@ -150,6 +152,10 @@ public: XmlNode(name), parent_to_add(parent_ref) {} + XmlSubNode(XmlNode& parent_ref, const std::string& xmlns, const std::string& name): + XmlNode(xmlns, name), + parent_to_add(parent_ref) + {} ~XmlSubNode() { -- cgit v1.2.3