root.AddChildElementByName "MonitorInstance",""
Set children = root.ChildElements()
str1= "id="&n
'msgbox str1
ip = "192.168.18.23-ping"
str2=" name="&cstr(ip)&n
'msgbox str2
num1="1"
num2="1100"
num3 = "10"
If rc = micPass Then str3 =cstr(str1)&"nodeID="&cstr(num1) &cstr(str2)&" monitorID="&cstr(num2 )&"interval="&cstr(num3) End If
'msgbox str3
If rc = micFail Then str3 = "第 "&N&" 次测试Fail" End If
root.AddChildElementByName "Result"&n,str3
doc.SaveFile "c:\report.xml".