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()); }
foreach (QXmppElement element, extensions()) { if (element.tagName() == "html") { QString html; QXmlStreamWriter writer(&html); element.toXml(&writer); return html; } }
QDomElement XmppElem2DomElem (const QXmppElement& elem) { QByteArray arr; QXmlStreamWriter w (&arr); elem.toXml (&w); QDomDocument doc; doc.setContent (arr, true); return doc.documentElement (); }