Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.async = False
xmlDoc.load "c:\calc1.xml"
If xmlDoc.parseError.errorCode <> 0 Then
Set myErr = xmlDoc.parseError
MsgBox("XML Loads Failed. " & myErr.reason)
Else
Set rootNode = xmlDoc.documentElement
Call rTravel(rootNode)
MsgBox strXML
End If
Sub rTravel (rNode)
Dim blnTwo,intTestCase,
blnTwo = False
iLen = rNode.childNodes.length
If iLen > 0 Then
For i = 0 To rNode.childNodes.length -1
Set child = rNode.childNodes.item(i)
Call rTravel(child)
childtext = child.nodeValue
strXML = strXML & childtext & chr(13)
Next
Else
Exit Sub
End If
End Sub作者: 没有蛀牙 时间: 2007-4-29 12:03
非常感谢,能用sdlkfj6
但有个小小的错误:
Dim blnTwo,intTestCase,
最后多了一个逗号作者: songfun 时间: 2007-4-29 13:24
呵呵,故意留给你排错的sdlkfj3作者: 白洁 时间: 2007-6-11 14:43
ding!!!作者: auto_tester 时间: 2014-4-24 09:23
学习了!