You can just save it in a file with an XML extension and give it to cCOMWebbrowser object and it will format and syntax highlight for you

Send ComNavigate sFilePath 0 0 0 0