How can i parse the following HTML
<body>
<span style="font-size:11px">12345</span>
<a>Hello<a>
</body>
I would like to retrive the data "12345" from a "span" with style="font-size:11px" from www.testtest.com, but I only want the that very data, and nothing else.
How can I accomplish this?
I think QXmlQuery is what you want. I think the code will be like
QXmlQuery query;
query.setQuery(html, QUrl("/body/span[@style='font-size:11p']"));
QString r;
query.evaluateTo(&r);
You can also provide URL directly to the query
query.setQuery(QUrl("http://WWW.testtest.com"), QUrl("/body/span[@style='font-size:11p']"));