Hello,
i want to get a XML file from online source,
example:
http://api.openweathermap.org/data/2...kikda&mode=xml
how can i download it and store the data in QTemporaryFile or pass it directly to QXmlStreamReader
i tried a lot but i dont know what is the problem exactly
example:
Qt Code:
  1. int main(int argc, char *argv[])
  2. {
  3. QCoreApplication a(argc, argv);
  4. QNetworkAccessManager *manager = new QNetworkAccessManager;
  5. QNetworkRequest request(QUrl("http://api.openweathermap.org/data/2.5/weather?q=skikda&mode=xml"));
  6. QNetworkReply* reply = manager->get( request) ;
  7. QXmlStreamReader reader( reply );
  8.  
  9. return a.exec();
  10. }
To copy to clipboard, switch view to plain text mode