It took an XML document to be converted to a SAX view. Qt documentation suggests using QXmlSimpleReader, but I was unable to properly connect this class, Qt Creator swears

How to connect QXmlSimpleReader and parse XML document?

The answer is simple and obvious: RTFM http://doc.qt.io/qt-5/qxmlsimplereader.html

Recorded in the file of my project * .pro: "QT + = xml"

Recorded in the header file file * .h: "#include"

Created a class in the * .cpp file: "QXmlSimpleReader xmlReader;"

Launched, works.

Thank you asianirish

  • Perhaps you forgot qmake: QT += xml , that is (if this type of project is used) in the .pro file you should add the line QT += xml . Well and, of course, in the appropriate place connect #include <QXmlSimpleReader> . Everything Must Earn - asianirish
  • Yes, that's it. Thank. - Sergey Volkov

0