Does anyone know how to create an <a
href="http://www.xulplanet.com/references/objref/HTMLDocument.html";>HTMLDocument</a>
in JavaScript (presumably using XPCOM) without loading the page in a
web browser? Once the page is rendered, it is easy to access the DOM,
but I want to take advantage of Mozilla's HTML parser on many pages, so
I don't want to display all of them in tabs just to activate the HTML
parser on each one.

All of the XPCOM interfaces that I have looked at can parse XML
documents without rendering them, but not (potentially malformed) HTML
documents. I have already looked at nsIWebNavigation,
nsIDocumentLoader, and nsISyncLoadDOMService and none of these seemed
to do the trick. I would be pretty surprised if it were impossible to
parse without displaying. Certainly from <a
href="http://www.mozilla.org/docs/url_load.html";>this diagram</a>, that
does not seem to be the case.

Thank you,
Michael

_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to