From 3d92360310d8e35394109058ff723da57af5b380 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 10 Nov 2013 02:26:07 +0100 Subject: Use the Expat library directly instead of relying on expatpp And now we handle namespaces, yay. And a nice little test. --- src/xmpp/xmpp_stanza.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/xmpp/xmpp_stanza.cpp') diff --git a/src/xmpp/xmpp_stanza.cpp b/src/xmpp/xmpp_stanza.cpp index ab26304..a1a04ba 100644 --- a/src/xmpp/xmpp_stanza.cpp +++ b/src/xmpp/xmpp_stanza.cpp @@ -72,16 +72,31 @@ void XmlNode::set_tail(const std::string& data) this->tail = data; } +void XmlNode::add_to_tail(const std::string& data) +{ + this->tail += data; +} + void XmlNode::set_inner(const std::string& data) { this->inner = xml_escape(data); } +void XmlNode::add_to_inner(const std::string& data) +{ + this->inner += xml_escape(data); +} + std::string XmlNode::get_inner() const { return this->inner; } +std::string XmlNode::get_tail() const +{ + return this->tail; +} + XmlNode* XmlNode::get_child(const std::string& name) const { for (auto& child: this->children) -- cgit v1.2.3