c++ - Possible to get QDomElement from QXmlStreamWriter? -
i'm writing little xmpp server using qxmpp. want create qxmppstanza , nowadays (as if client had sent it) server , plugins using
void qxmppserver::handleelement(const qdomelement &element) this function requires qdomelement , not qxmppstanza. xml realted function found in qxmppstanza , derived classes (besides parse(...) ) function
void toxml(qxmlstreamwriter *writer) i don't have experience xml handling in qt yet, there more performant way writing xml string/bytearray, utilize input create new qdomelement , homecoming documentelement?
after doing farther research have take not possible.
as stated in qdomdocument's documentation require qdomdocument in order work qdomelement (and other nodes):
since elements, text nodes, comments, processing instructions, etc., cannot exist outside context of document (...)
the qxmlstreamwriter doesn't have qdomdocument, have create qdomdocument (which of course of study must live long want work element) , parse text (qdomdocument::setcontent).
c++ qt dom qxmpp
No comments:
Post a Comment