i am struck in problem of writing to an XML file. I know how to read an xml file. Let me explain it clearly. I have to read the value from an xml file and pass it to a label or listbox and then write the value to another xml file. I did the first part of reading and i am struck in writing. I have gone through several queries in stackoverflow. But its not working for me. Help me out Here is the code which i used for writing
var v = new XMLWriter();
v.writeStartDocument(true);
v.writeElementString('option','Hello World');
v.writeAttributeString('foo','bar');
v.writeEndDocument();
console.log( v.flush() );