|We were able to reproduce the problem that you reported.
With the above code, the first MsgBox reports 7, whereas the next one reports 9! If you create an XML file in notepad, and load it using MSXML DOM using load method, you'll see the same behaviour. If you just save the file (without any change to XML) using MSXML DOM save method, you'll see 2 bytes more in the XML file. If you now open this XML file in Visual C++ in binary mode, you'll see 0D 0A at the end. We'll continue researching into this issue to see if this behaviour is recommended by XML specification or if it is a bug in MSXML. We'll post the findings here.
Dim objXMLDoc As New MSXML2.DOMDocument40
Dim strXMLText As String
strXMLText = "<ROOT/>"