Javascript – Edit a file using javascript

javascript

I need to edit an xml file using javascript. Now I'm involved in a project of online testing.

The question.xml file is already in the project folder.

In that i want to add or edit the questions(only using javascript). I'm able to bring the particular content through ajax, but I am not able to edit the file.

Best Solution

Javascript can't write to a file. The best you'll be able to do is get Javascript to read and edit the XML then post that data to a server-side script to write to file.