XML Parsing to VBS
Do you have this script in VBS?
// parse XML log file
var doc = new ActiveXObject("MSXML2.DOMDocument");
doc.async = false;
doc.load("log.xml");
doc.setProperty("SelectionNamespaces",
"xmlns:w='https://winscp.net/schema/session/1.0'");
// look for file tags
var nodes = doc.selectNodes("//w:file");
WScript.Echo("There are " + nodes.length + " files and subdirectories:");
// list the files
for (var i = 0; i < nodes.length; ++i)
{
var filename = nodes[i].selectSingleNode("w:filename/@value").value;
WScript.Echo(filename);
}
// parse XML log file
var doc = new ActiveXObject("MSXML2.DOMDocument");
doc.async = false;
doc.load("log.xml");
doc.setProperty("SelectionNamespaces",
"xmlns:w='https://winscp.net/schema/session/1.0'");
// look for file tags
var nodes = doc.selectNodes("//w:file");
WScript.Echo("There are " + nodes.length + " files and subdirectories:");
// list the files
for (var i = 0; i < nodes.length; ++i)
{
var filename = nodes[i].selectSingleNode("w:filename/@value").value;
WScript.Echo(filename);
}