Unable to Echo XML data after parsing.

Advertisement

trinityr
Guest

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!

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum