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. Parse HTML using QRegExp
Forum Updated to NodeBB v4.3 + New Features

Parse HTML using QRegExp

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.1k 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.
  • A Offline
    A Offline
    alexandros
    wrote on last edited by
    #1

    Hi there.

    I am trying to get a list of values out from an HTML file and had no luck so far with QXmlStreamReader as the documentation suggests.

    The entries I am interested in look like this:

    @<a data-track="something" href="someurl" title="Heaven"><img src="somesource.jpg" /></a>@

    and I am trying to extract someurl from it.

    That's what I've coded so far: http://codepad.org/SFwRAIyR (sorry for external link but the editor could not take it correctly here)

    What I get from the code you just saw is the first someurl i'm interested in and the whole HTML string follows, which is not what I want (list.length() == 1, while I need list.length() == n, where n is the number of someurl entries inside my HTML string).

    Any help appreciated as I wasted my whole afternoon and night for making this to work to no avail!

    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