aboutsummaryrefslogtreecommitdiff
path: root/source/QXmppElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/QXmppElement.cpp')
-rw-r--r--source/QXmppElement.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/QXmppElement.cpp b/source/QXmppElement.cpp
index 7dac43e6..a793a999 100644
--- a/source/QXmppElement.cpp
+++ b/source/QXmppElement.cpp
@@ -33,6 +33,10 @@ QXmppElement::QXmppElement()
QXmppElement::QXmppElement(const QDomElement &element)
{
m_tagName = element.tagName();
+ QString xmlns = element.namespaceURI();
+ QString parentns = element.parentNode().namespaceURI();
+ if (!xmlns.isEmpty() && xmlns != parentns)
+ m_attributes.insert("xmlns", xmlns);
QDomNamedNodeMap attributes = element.attributes();
for (int i = 0; i < attributes.size(); i++)
{
@@ -73,6 +77,11 @@ void QXmppElement::setChildren(QList<QXmppElement> &children)
m_children = children;
}
+bool QXmppElement::isNull() const
+{
+ return m_tagName.isEmpty();
+}
+
QString QXmppElement::tagName() const
{
return m_tagName;