How can I parsing html in Qt by C++?
-
Hi,
What kind of parsing do you have in mind ?
-
There's the QWebElement class that could be of use but it's in the deprecated QtWebKit module.
But are you looking for a library to do the parsing or write your own ?
-
There's the QWebElement class that could be of use but it's in the deprecated QtWebKit module.
But are you looking for a library to do the parsing or write your own ?
-
If you know in advance the html you want to parse and that it fits in the xml category you can use the QXmlStreamReader class. For example, you html snippet should be parsed without any problem.
If you want to use regular expressions go with QRegularExpression.
Again, it depends on what exactly you need. If it's to parse any and every html page then you should consider a dedicated library.