I retrieve a XML file from my rest service like the following:
   xmlhttp.open( "GET",
                 "http://localhost:8080/manager/rest/beanRepresentation/", 
                 false );
   xmlhttp.send();
   xmlDoc=xmlhttp.responseXML; 
Now that the XML is stored in xmlDoc, I will change some fields in this xmlDoc. Say I make a change through my webpage, and change the the following:
xmlDoc.getElementsByTagName("beanRepresentation")[i]
      .getElementsByTagName("personName")[0]
      .childNodes[0]
      .nodeValue = "John";
Now that this change is made. I want to PUT this newly changed xmlDoc back to my rest service and update it, so next time I load my page, the name will be John.
How do I do this? Is this the right way?
   xmlhttp.open("PUT",
                "http://localhost:8080/manager/rest/beanRepresentation/",
                false);
   xmlhttp.send(xmlDoc);
the rest service is able to handle "PUT" by the way.
 
    