javascript xml saving problem
- by Guru
hi there,
I want to modify some data on XML file residing on server side by using javascript.
I'm using following code
var xh;
if(window.XMLHttpRequest)
{
xh=new XMLHttpRequest();
}
else
{
xh=new ActiveXObject("Microsoft.XMLHTTP");
}
xh.open("get","books.xml",false);
xh.send("");
var xdoc=xh.responseXML;
var x=xdoc.getElementsByTagName("title");
x[0].getAttributeNode("lang").nodeValue="zh";
xh.save("books.xml");
but its not working
Thanks in advance,
Guru