.. but Mozilla still only supports the load() method ??
Whats happening
....or is there any best practice for implimenting document save()
functionality ??
Can't you use XMLHttpRequest/DOMParser/XMLSerializer?
-Olli
....but I get "ns_error_file_not_found" [x80520012] message during init()
I'm not sure if this means an error file or the output file.
Do you happen to know if the outputfile (dom.xml) has to exist before hand
....or is it deleted&created automatically ?
*************************************************************
var serializer = new XMLSerializer();
var foStream =
Components.classes["@mozilla.org/network/file-output-stream;1"]
.createInstance(Components.interfaces.nsIFileOutputStream);
var file = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties)
.get("ProfD", Components.interfaces.nsIFile); // get profile
folder
file.append("extensions"); // extensions sub-directory
file.append("{5872365E-67D1-4AFD-9480-FD293BEBD20D}"); // GUID of your
extension
file.append("dom.xml"); // filename
foStream.init(file, 0x02 | 0x08 | 0x20, 0664, 0); // write, create,
truncate
serializer.serializeToStream(doc, foStream, ""); // rememeber, doc is the
DOM tree
foStream.close();
********************************************************
PS
dont you mean save() is not part of DOM3 Load&Safe.?
>>
> load() is not part of DOM3 Load&Safe.
> See https://bugzilla.mozilla.org/show_bug.cgi?id=494705
> and https://bugzilla.mozilla.org/show_bug.cgi?id=155749
>
> Can't you use XMLHttpRequest/DOMParser/XMLSerializer?
>
PPS
I would still be interested in knowing whether support for document.load
(and document.save) is only a temporary
feature !!
.
but probably the real problem wasVista security settings
"rvj" <r...@rolemodels.net> wrote in message
news:_q2dncdy5YYRLhbX...@mozilla.org...