Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

fick

NVM.. got it. Thanks.

dim objShell

Set objShell = WScript.CreateObject("Wscript.Shell")

set xmlDoc=CreateObject("Microsoft.XMLDOM")
xmlDoc.async="true"
xmlDoc.load("zeta.xml")

Set colNodes=xmlDoc.selectNodes _
("//upload/destination/@value")

For Each objNode in colNodes
Wscript.Echo objNode.Text
Next
fick

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);
}