XML
-
wrote on 11 Mar 2012, 10:19 last edited by
how to create a XML document in Qt ?
-
wrote on 11 Mar 2012, 11:27 last edited by
You need to work with QDomDocument, QDomNode and QDomElement classes. If you want to start from scratch, create new QDomDocument object and then populate it with elements.
-
wrote on 11 Mar 2012, 11:32 last edited by
You can use "QXmlStreamWriter":http://qt-project.org/doc/qt-4.8/qxmlstreamwriter.html to create XML documents. Here is a "simple example":http://www.developer.nokia.com/Community/Wiki/Generate_XML_programatically_in_Qt .
-
wrote on 11 Mar 2012, 15:44 last edited by
And now how to load the XML file to @QVEctor<QString>m_map@
-
wrote on 11 Mar 2012, 17:36 last edited by
didnt help :(
-
wrote on 11 Mar 2012, 18:10 last edited by JohanSolo 5 Nov 2015, 07:22
Maybe try this doc page
Googling for "qxmlstreamreader example" gave me those two examples:
http://www.developer.nokia.com/Community/Wiki/Using_QXmlStreamReader_to_parse_XML_in_Qt
http://www.qtforum.org/article/28453/qxmlstreamreader-parsing-a-simple-xml-document.htmlBtw, I would say that QVector< QString > is not the most appropriate storage for XML information...
-
wrote on 13 Mar 2012, 08:17 last edited by
"youtube link":www.youtube.com/watch?v=NXGE5XUrRSI&feature=youtu.be
i watched this video and now understood whats all there in the documentation
[edit: fixed link, eddy]
4/8