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

martin

Re: Unable to Echo XML data after parsing.

Consider using WinSCP .NET assembly instead of parsign the XML log on your own:
https://winscp.net/eng/docs/library
trinityr

Unable to Echo XML data after parsing.

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

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
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!