Hi,
I have some 100 xml documents on a sharepoint website and I would like to replace the value of a particular attribute inside each XML document on the server. To do this:
I would like to run a command line tool developed in Javascript which will ask me the url to access the documents from as the parameter. Here is what I have so far.
urlXML(WScript.Arguments(0));
function UrlXML(url) {
var http = new ActiveXObject("MSXML2.XmlHttp.6.0");
http.open("GET",url,false);
http.send();
var xmldoc = new ActiveXObject("MSXML2.DOMDocument.6.0");
xmldoc.loadXML(http.responseText);
xmlDocrepiar(xmldoc);
http.open("PUT",url,false);
http.send(doc);
}
function xmlDocrepair(xmldoc) {
xmldoc.setProperty("Namespaces","xmlns:g='http://www.xxx.com/'");
/*
Code to find an Element and then repalce the value of a particular attribute.
*/
}