کد

<script>
    if (window.XMLHttpRequest)
        {// code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp=new XMLHttpRequest();
        }
    else
        {// code for IE6, IE5
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
    xmlhttp.open("GET","books.xml",false);
    xmlhttp.send();
    xmlDoc=xmlhttp.responseXML;

    x = xmlDoc.getElementsByTagName( " title " )[0].childNodes[0];
    x.nodeValue = " Easy Cooking " ;
    x = xmlDoc.getElementsByTagName( " title " )[0].childNodes[0];
    txt = x.nodeValue;
    document.write( txt ) ;
</script>

خروجی