|
回复 1# csj
Function readConfig(str_Path)
Dim str_nRep,str_icon,str_eType,str_status
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.load(str_Path)
For i = 0 to xmlDoc.getElementsByTagName("NodeArgs").Length -1
str_nRep = str_nRep + xmlDoc.getElementsByTagName("NodeArgs")(i).attributes.getNamedItem("nRep").nodeValue + vbCrLf
str_icon = str_icon + xmlDoc.getElementsByTagName("NodeArgs")(i).attributes.getNamedItem("icon").nodeValue + vbCrLf
str_eType = str_eType + xmlDoc.getElementsByTagName("NodeArgs")(i).attributes.getNamedItem("eType").nodeValue + vbCrLf
If xmlDoc.getElementsByTagName("NodeArgs")(i).attributes.length = 3 Then
str_status = str_status + "No node" + vbCrLf
else
str_status = str_status + xmlDoc.getElementsByTagName("NodeArgs")(i).attributes.getNamedItem("status").nodeValue + vbCrLf
End If
Next
Set xmlDoc = Nothing
msgbox str_nRep
msgbox str_icon
msgbox str_eType
msgbox str_status
End Function |
|