If you’re lucky, all that should be needed to convert a TeX file, mydoc.tex to XML, and then to HTML would be:
This will carry out a default transformation into HTML5,
which represents mathematics using MathML. Using an
extension of xhtml would generate XHTML including MathML.
Adding the option
--format=html4 will generate
HTML (version 4), using images to represent the math.