Parse a xml file using c++ & Qt

后端 未结 3 1875
夕颜
夕颜 2021-02-09 19:51

I try to parse a XML-file with the following structure:


  
     
        

        
3条回答
  •  孤街浪徒
    2021-02-09 20:15

    For XML things, it was suggested to use QXmlStreamReader and QXmlStreamWriter from QtCore module, just because the QDom and QSax things have been not actively maintained for a while.

    http://doc.qt.digia.com/4.7/qxmlstreamreader.html

    http://doc.qt.digia.com/4.7/qxmlstreamwriter.html

    I will not copy&paste the example code from qt docs to here. Hope you could understand them well. And you also could check examples/xml directory in qt 4.x.

提交回复
热议问题