void PrivateStorageIq::toXmlElementFromChild(QXmlStreamWriter *writer) const
{
    writer->writeStartElement("query");
    helperToXmlAddAttribute(writer, "xmlns", ns_private_storage);
    m_payload.toXml(writer);
    writer->writeEndElement();
}
void PrivateStorage::setXml(const QXmppElement &element)
{
    QBuffer buffer;
    buffer.open(QIODevice::WriteOnly);
    QXmlStreamWriter writer(&buffer);
    element.toXml(&writer);
    m_data = QString::fromUtf8(buffer.data());
}
Beispiel #3
0
 foreach (QXmppElement element, extensions()) {
     if (element.tagName() == "html") {
         QString html;
         QXmlStreamWriter writer(&html);
         element.toXml(&writer);
         return html;
     }
 }
Beispiel #4
0
	QDomElement XmppElem2DomElem (const QXmppElement& elem)
	{
		QByteArray arr;
		QXmlStreamWriter w (&arr);
		elem.toXml (&w);

		QDomDocument doc;
		doc.setContent (arr, true);
		return doc.documentElement ();
	}