Quantcast
Channel: create and modify xml file using javascript (want to save xml file on client side) - Stack Overflow
Viewing all articles
Browse latest Browse all 5

create and modify xml file using javascript (want to save xml file on client side)

$
0
0

How to save xml file on client side using javascript...?

        if (window.XMLHttpRequest) {            xhttp = new XMLHttpRequest();        }        else // Internet Explorer 5/6        {            xhttp = new ActiveXObject("Microsoft.XMLHTTP");        }        xhttp.open("GET", "User.xml", false);        xhttp.send("");        xmlDoc = xhttp.responseXML;        xmlDoc.getElementsByTagName("Username")[0].childNodes[0].nodeValue = 'asdasf';        xmlDoc.getElementsByTagName("password")[0].childNodes[0].nodeValue = 'asdAS';        xmlDoc.getElementsByTagName("UserId")[0].childNodes[0].nodeValue = '12';        xmlDoc.save("User.xml");

this is not working.. showing error as save is not a function.

ThanksSuneetha.


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images