29
29
#include <QImageWriter>
30
30
#include <QtCrypto>
32
// Justin's XML helper functions
34
static QDomElement textTag(QDomDocument *doc, const QString &name, const QString &content)
36
QDomElement tag = doc->createElement(name);
37
QDomText text = doc->createTextNode(content);
38
tag.appendChild(text);
43
static QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found)
48
for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
49
QDomElement i = n.toElement();
52
if(i.tagName().upper() == name.upper()) { // mblsha: ignore case when searching
63
// mblsha's own functions
65
static QDomElement emptyTag(QDomDocument *doc, const QString &name)
67
QDomElement tag = doc->createElement(name);
72
static bool hasSubTag(const QDomElement &e, const QString &name)
75
findSubTag(e, name, &found);
79
static QString subTagText(const QDomElement &e, const QString &name)
82
QDomElement i = findSubTag(e, name, &found);
84
return i.text().stripWhiteSpace();
32
#include "xmpp_xmlcommon.h"
88
34
using namespace XMPP;
35
using namespace XMLHelper;
90
37
//----------------------------------------------------------------------------