You can amend an xml file with javascript but you cannot save it directly without using server-side functionality (or VBscript). The best you can do with javascript is to write the amended file to a new window, and then cut and paste the contents into a text editor and save it from that.
patrick