Re: XMLDocument.save("localfile.xml") <possible solutions>
Christian Biesinger <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Message-ID | <[email protected]> |
Lucky wrote: > if (!localFile.exists()) localFile.create(localFile.NORMAL_FILE_TYPE, > 0644); This is not needed as you pass PR_CREATE_FILE (0x08) to init. > outputStream.init(localFile, 0x04 | 0x08 | 0x20, 0644, 0); not sure why this uses PR_RDWR (0x04) rather than PR_WRONLY (0x02)... As for the second variant: > (new XMLSerializer).serializeToStream(this, os, charset); This doesn't work, does it? The converter output stream is not an nsIOutputStream...