I'm having problems when using XML DOM to create XML documents because I want to specify a particular encoding and it doesn't appear to let me:
Code:
Dim xmlDoc As MSXML2.DOMDocument40
Dim pi As MSXML2.IXMLDOMProcessingInstruction

Set xmlDoc = New MSXML2.DOMDocument40
Set pi = xmlDoc.createProcessingInstruction("xml", "version='1.0' encoding= 'ISO-8859-1'")
        
xmlDoc.appendChild pi
But in my generated document, it looks like this:

<?xml version="1.0" ?>

i.e. there is no encoding attribute.