' 检查XML文档是否有错误
If xmlDoc.parseError.errorCode <> 0 Then
Set myErr = xmlDoc.parseError
MsgBox("XML Loads Failed. " & myErr.reason)
Else
Set rootNode = xmlDoc.documentElement
set ReadXml=rootNode
End If
set xmlDoc=Nothing
End Function
即获得根节点,但是再方法末尾set xmlDoc=Nothing把xmlNothing给释放了