diff options
Diffstat (limited to 'protocols/JabberG/src/jabber_xml.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_xml.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_xml.cpp b/protocols/JabberG/src/jabber_xml.cpp index 89f39e567d..142f0bc331 100644 --- a/protocols/JabberG/src/jabber_xml.cpp +++ b/protocols/JabberG/src/jabber_xml.cpp @@ -104,10 +104,9 @@ TiXmlElement*operator<<(TiXmlElement *node, const XCHILDNS &child) TiXmlElement* operator<<(TiXmlElement *node, const XQUERY &child)
{
- TiXmlElement *n = node->GetDocument()->NewElement("query");
- if (n)
- n->SetAttribute("xmlns", child.ns);
- return n;
+ TiXmlElement *res = XmlAddChild(node, "query");
+ res->SetAttribute("xmlns", child.ns);
+ return res;
}
/////////////////////////////////////////////////////////////////////////////////////////
|