Equivalent of mshtml for Linux?
Is there any equivalent of mshtml for Linux? Preferably, I should be able to use it from Python?
Gnome's libxml might help you.
You can do this with a combination of TidyLib (to clean up non-well formed HTML and convert to XHTML) and libxml2. TidyLib itself has uses a DOM-like structure as well, so you may not need libxml2, depending on what you're trying to do.
There are many native Python libraries you can use, starting with thebuilt-in SGMLParser and HTMLParser modules. You might also take a look at Beautiful Soup:
If I recall correctly, KHTML (Konqueror and Safari's rendering engine) has Python bindings.
Can you use MSHTML to parse a document without hosting IE?
Fog Creek Home