Mit VBScript kann man MSXML benutzen. MSXML 3 gibt es überall, wo
mindestens IE 6 installiert ist, MSXML 6 gibt es (zusätzlich) unter
Windows XP SP 3, Vista, Windows 7.
Also etwa mit MSXML 3 (ja, mit MSXML 3 benutzt man die ProgId
Msxml2.DOMDocument.3.0"):
Dim doc
Set doc = CreateObject("Msxml2.DOMDocument.3.0")
Dim b
Set b = doc.appendChild(doc.createElement("B"))
b.setAttribute "Name", "Test"
' hier weitere Attribute setzen
b.appendChild doc.createTextNode(VbCrLf)
Dim r
Set r = b.appendChild(doc.createElement("R"))
r.setAttribute "Name", "Test1"
' hier weitere Attribute setzen
' hier weitere Elemente erzeugen
doc.save "datei.xml"
Siehe auch die MSXML SDK online unter
http://msdn.microsoft.com/en-us/library/ms763742(v=VS.85).aspx
oder auch als download
http://www.microsoft.com/downloads/details.aspx?FamilyID=993C0BCF-3BCF-4009-BE21-27E85E1857B1&displaylang=en
--
Martin Honnen --- MVP Data Platform Development
http://msmvps.com/blogs/martin_honnen/