Re: XMLDocument.save("localfile.xml") <possible solutions>

Christian Biesinger <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xml
Message-ID <[email protected]>
Lucky wrote:
> Lucky wrote:
>> [sloppy source code here...] :)
> sorry bout that, will also post as attachments..
> slightly cleaned up code too

Hm..

save.1.js looks right, except:
     outputSteam.close();
Should that be outputStream? ;)

But I don't understand why save.js works:
   var outputStream =
     Components.classes["@mozilla.org/intl/converter-output-stream;1"].
     createInstance(Components.interfaces.nsIConverterOutputStream);
   outputStream.init(file, (charset=charset||"UTF-8"), 0, 0x0000);

You can't initialize an nsIConverterOutputStream with a file. 
(charset=charset also doesn't make much sense?)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.