I tried to
1) load an xml file using javascript as an object, say note.xml
2) then save the object to a new xml file, sa
Your problem is: javaScript does not have an input/output (I/O
) API as it is a client-side scripting language and consequently has no access to the file system via the server. You would need to use a server-side scripting language to save data to a server. There may be hacks to solve your problem client-side, but they are probably either unsave or otherwise buggy. (btw: what api is the save
method member of? Did you make that up?)
What you can do is save data temporarily to any DOM element (e.g. window, or a javaScript) object. There is however no way to make these changes permanent.
In your case, looking in to PHP
scripting might be the best way to go.