Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Parsing HTML content
QtWS25 Last Chance

Parsing HTML content

Scheduled Pinned Locked Moved Solved General and Desktop
htmlqwebkit
5 Posts 3 Posters 2.7k Views
  • 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.
  • B Offline
    B Offline
    Bagavathi
    wrote on last edited by
    #1

    I've the HTML file, which is having the data in the form of tables <Table>. I want to extract those data to my application. What is the correct method to parse the data? and please suggest me any tutorials or examples, if possible.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Since html is xml, you can use Qt's xml module to do what you want.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      B 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Since html is xml, you can use Qt's xml module to do what you want.

        Hope it helps

        B Offline
        B Offline
        Bagavathi
        wrote on last edited by
        #3

        Hi SGaist,

        Thank you very much for you reply. I'ii try with Qt's xml module.

        1 Reply Last reply
        0
        • Chris KawaC Offline
          Chris KawaC Offline
          Chris Kawa
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @SGaist Since html is xml (...)
          It's not! XHTML is, but it's in rapid decline in favor of Html5. Html has a lot less stricter rules, noticeably a lot of tags don't require a closing tag, which will trip xml parsers.
          Qt's xml parser will work or not, depending on how close to xml the html code is.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Good point, I should have added that if it's only to parse html tables, the XML parser should be enough.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            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