Forum Moderators: open
I'm using Mozilla's file reading to load this HTML file. E.g.
var fstream = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);
var sstream = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(Components.interfaces.nsIScriptableInputStream);
var parser = new DOMParser();
var Gdom = parser.parseFromString(FILE_AS_STRING, "text/xml" );
var Gdoc = Gdom.documentElement;
Does anyone have insight into my dilemma?
Originally, I was "GET"ting this independent HTML, putting it into an iframe, and trying to parse through it there. That's a browser security issue (I think)... you can't look through another document's DOM that's not on your domain.
That is why I've developed a procedure to GET the HTML, write it to the filesystem, read it from the filesystem, and then attempt to parse it. But getting this back into DOM form is now killing me...