Parsing HTML content
Solved
General and Desktop
-
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.
-
Hi and welcome to devnet,
Since html is xml, you can use Qt's xml module to do what you want.
Hope it helps
-
@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. -
Good point, I should have added that if it's only to parse html tables, the XML parser should be enough.
5/5