I’ve recently have a reason to include into our build script the creation of an XML configuration file. The most straightforward way I can think of to do this is to hard-code the XML content as a string into the script and then to simply create a file and write that XML string to the file (named appropriately etc). Is there a more elegant or efficient way of doing this?
The build script that I am looking to modify is written in VBScript.
you could use an XmlWriter to avoid printing strings. This will make writing well-formed XML documents a lot easier.
You can find free sample code in VBScript here