Hitesh Khamesra wrote:
xml = parser.parseFromString(content, "text/xml");It does not seems to return, exact "nsIDOMDocument " object. Is there any other way to get "nsIDOMDocument " object from HTML text.
Erm, it does return an nsIDOMDocument for me:js> parser = Components.classes["@mozilla.org/xmlextras/domparser;1"].createInstance(Components.interfaces.nsIDOMParser);
[xpconnect wrapped nsIDOMParser] js> content="<foo/>" <foo/> js> xml = parser.parseFromString(content, "text/xml"); [xpconnect wrapped nsIDOMDocument] However, this does not support HTML, only XHTML and other XML content. FWIW, npm.dom / mozilla-dom would be a better place for this question...
smime.p7s
Description: S/MIME Cryptographic Signature