Topic "Unable to Echo XML data after parsing."

Author Message
trinityr

Guest


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

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


I am calling the function using this
Code:
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!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Consider using WinSCP .NET assembly instead of parsign the XML log on your own:
http://winscp.net/eng/docs/library
Advertisements

You can post new topics in this forum






Search Site

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License