Page 1 of 1
AJAX and edit XML
Posted: Wed Jun 06, 2007 8:44 am
by sarris
Hi there, i was wondering if its possible to add elements onto an existing XML file and how that would happen.
I am trying to find how to do that with AJAX but didnt find anything really. Only how to retrieve and read an XML.
Posted: Wed Jun 06, 2007 9:12 am
by feyd
If you're talking about altering the file itself, Ajax does not have that power. If you're talking about inserting an element temporarily (in the browser) Ajax can do that.
The former would require interacting with the server to get the file changed.
Posted: Wed Jun 06, 2007 9:31 am
by sarris
i see...so the solution would be to retrieve the XML document using AJAX and the http_request.XMLresponse, alter the XML document topically and write it on a new file which overwrites the existing...Right?
Posted: Fri Jun 08, 2007 9:41 am
by Kieran Huggins
javascript doesn't have file-write permissions in a browser - you should look at using PHP and it's XML functions instead.