' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Set doc = CreateObject("MSXML.DOMDocument")
s = "<all>" & vbCrlf & "    <one>A</one>" & vbCrlf & "    <one>BB</one>" & vbCrlf & "    <one>CCC</one>" & vbCrlf & "</all>"
WScript.Echo s
doc.LoadXML(s)
WScript.Echo doc.Xml
doc.Save("foobar.xml")
Set doc = Nothing
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("foobar.xml", 1)
alllines = f.ReadAll
f.Close
Set f = Nothing
Set fso = Nothing 
WScript.Echo alllines
