I have a program that outputs an XML file based upon the information a user enters into online form. I am trying to parse this XML file using vbscript. Within the XML file there is a field called EMAILDISTRIBUTIONLIST that will have an e-mail address entered into it (this e-mail address will be changing every time I parse the file). What I need is a way to parse the file and get the email address associated with that EMAILDISTRIBUTIONLIST field. I have attached a sample XML file for your reference. In looking at multiple XML files, I have noticed that the role id of "e5f72d7e-2ca7-418b-bfd0-7
4" is always the same from xml to xml - so that might help in parsing out the info if the field name can't be used for some reason.
I had gotten this far, but it doesn't work:
'On Error Resume Next
Set xmldoc = CreateObject("Microsoft.XM
'Set xmldoc = CreateObject("MSXML2.DOMDo
xmldoc.async = False
xmldoc.setProperty "SelectionLanguage", "XPath"
If 0 = xmldoc.parseError Then
sXPath = "/request/participants/rol
Set ndlWantedHosts = xmldoc.selectNodes(sXPath)
If 0 = ndlWantedHosts.length Then
WScript.Echo sXPath, "failed due to length"
For Each ndWantedHost In ndlWantedHosts
WScript.Echo "email address:", ndWantedHosts.parentNode.s