Topic "Unable to Echo XML data after parsing."

Author Message


Here is the current function I am trying to use to parse my log.

Function XMLRead(XMLFileName, XMLTag)
Set xmlDoc = CreateObject("Msxml2.DOMDocument")
Set ElemList = xmlDoc.getElementsByTagName(XMLTag)
XMLRead = ElemList.item(0).Text
End Function

I am calling the function using this
strSCPlog = "log.xml"
SuccessMsg = ReadXMLLog (strSCPlog, "session/upload")
Wscript.echo SuccessMsg

Each time I try to echo the result from the XML file it comes back blank. Am I missing something? I really don't care if I can echo the entire upload node. I just need an easy way to tell a user that the automated upload is successful. Right now I am attaching the XML log file and that is more information than they care for.

Any advice or direction would be great!
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26890
Location: Prague, Czechia
Consider using WinSCP .NET assembly instead of parsign the XML log on your own:

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License