0

How i can read this xml file

<Subs>
  <Sub Report="BusinessSummarySubs" EMails="lalla@yahoo.com; haha@yahoo.com">
  <Sub Report="PlayerSubs" EMails="hehe@hotmail.com">
</Subs>

and replace @VARIABLE in BusinesSummarySubs.txt with EMails value in

Here is the content(part of the content) from BusinessSumarySubs.txt

CType(extensionParams(0),ParameterValue).Name = "TO"
CType(extensionParams(0),ParameterValue).Label = ""
CType(extensionParams(0),ParameterValue).Value = "@VARIABLE"
John
  • 69
  • 6

2 Answers2

0

If you look here, you'll see how to search for and to access attributes. Follow the link chain to 'the same for text' and do a mental diff, if you want to get a skeleton for a minimal XML processing script to use for your next task.

Single placeholder substitution in VBScript is easy: just use Replace:

>> attr = "lalla@yahoo.com; haha@yahoo.com"
>> content = "... .Value = ""@VARIABLE"" ..."
>> ph = "@VARIABLE"
>> WScript.Echo Replace(content, ph, attr)
>>
... .Value = "lalla@yahoo.com; haha@yahoo.com" ...
>>
Community
  • 1
  • 1
Ekkehard.Horner
  • 38,498
  • 2
  • 45
  • 96
-1

Something like this i suposed

   set xmlDoc=CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("note.xml")

for each Emails in xmlDoc.documentElement.childNodes
  document.write(Emails .nodename)
  document.write(": ")
  document.write(Emails .text)
next
John
  • 69
  • 6