HTML verarbeitungs Lib
-
Guten Tag,
ich suche eine c++ Lib die mir HTML Sourcecode vorverarbeitet. Sprich ich geben ihr den Source mit einer Funktion (z.B. SetSource(Source) und kann dann Objekte, Tabellen usw abfragen (z.B. getTableByID(ID).getEntry(x,y);)
Kennt jemand so eine Lib?
mfg
Anony
-
libxml kann das, afaik.
-
Eine XML Lib wird bei HTML in den meisten Fällen wohl scheitern, wenn es nicht gerade XHTML ist.
Eine Bibliothek, mit der das geht, wäre Qt:
http://qt-project.org/doc/qt-5/qwebframe.htmlAllerdings wäre das wohl mit Kanonen auf Spatzen geschossen, wenn man nicht ohnehin Qt benutzt.
-
http://xmlsoft.org/html/libxml-HTMLparser.html schrieb:
this module implements an HTML 4.0 non-verifying parser with API compatible with the XML parser ones. It should be able to parse "real world" HTML, even if severely broken from a specification point of view.
q.e.d.
-
Ok
Wobei "should be able" natürlich nicht so ganz 100%ig klingt.