Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Import data (XML file) from URL
Forum Updated to NodeBB v4.3 + New Features

Import data (XML file) from URL

Scheduled Pinned Locked Moved QML and Qt Quick
8 Posts 3 Posters 3.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    korsarqa
    wrote on last edited by
    #1

    Good day!

    I beginner in QT and i have problem with my application.

    I need to import XML file from site, and then start working it.

    Processing the XML file I barely know, but I do not know how to do the import, make a request to the site.

    Thanks.

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      I think "xmllistmodel":http://qt-project.org/doc/qt-5/qml-qtquick-xmllistmodel-xmllistmodel.html would help you.

      157

      1 Reply Last reply
      0
      • K Offline
        K Offline
        korsarqa
        wrote on last edited by
        #3

        [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.

        1 Reply Last reply
        0
        • p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #4

          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++.

          157

          1 Reply Last reply
          0
          • K Offline
            K Offline
            korsarqa
            wrote on last edited by
            #5

            [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.

            1 Reply Last reply
            0
            • p3c0P Offline
              p3c0P Offline
              p3c0
              Moderators
              wrote on last edited by
              #6

              Is it an RSS feed ? Can you post that URL ?

              157

              1 Reply Last reply
              0
              • K Offline
                K Offline
                korsarqa
                wrote on last edited by
                #7

                [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.

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  jiangcaiyang
                  wrote on last edited by
                  #8

                  Maybe the same as above says.
                  Download html file via QNetworkAccessManager, and deal it using C++ string functions yourself, then bring it to QML.

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved