Here's the scenario, I use QtNetwork module to retrieve a html page from internet,
In the old days, I just create a new QWebPage object, and use the setHtml()
function to load it, and parse it (find specific tags and attributes), but that looked lame.
Now I think I could do it through QtScript, I would give a QByteArray as input, and parse the page, get some elements and attributes, but with javascript syntax.
i.e in the old days I do QWebElement::findFirst()
plus a foreach loop over them, now I want to do getElementByID
like stuff, not with C++ code, but pure js.
That's possible? If so, can anyone give an example of code? I'm running Qt 4.8.4
Or whatever that can avoid the QWebElement style parsing.