Import data (XML file) from URL
-
-
Hi,
I think "xmllistmodel":http://qt-project.org/doc/qt-5/qml-qtquick-xmllistmodel-xmllistmodel.html would help you.
-
[quote author="p3c0" date="1409299225"]Hi,
I think "xmllistmodel":http://qt-project.org/doc/qt-5/qml-qtquick-xmllistmodel-xmllistmodel.html would help you.[/quote]
i know it. This type solves the problem with file handling.
But I do not know how to get this XML file by sending a request to the site. -
Do you mean you want to download the file ? If So, then you will have to use "qnetworkaccessmanager":http://qt-project.org/doc/qt-5/qnetworkaccessmanager.html from C++.
-
[quote author="p3c0" date="1409300402"]Do you mean you want to download the file ? If So, then you will have to use "qnetworkaccessmanager":http://qt-project.org/doc/qt-5/qnetworkaccessmanager.html from C++.[/quote]
Just download a file? No!
For example, the site has information on the latest news of the country. I need to get this information. -
Is it an RSS feed ? Can you post that URL ?
-
[quote author="p3c0" date="1409301362"]Is it an RSS feed ? Can you post that URL ?[/quote]
No, it's not rss.
URL: http://omsk.zaotdih.ru/afisha/all/
For example, I need to get the next tags: event name,place, time and url of image. -
Maybe the same as above says.
Download html file via QNetworkAccessManager, and deal it using C++ string functions yourself, then bring it to QML.