无法读取某种格式的 XML 节点,这让我和我的伙伴发疯了……
我们已经尝试过了..但我们不断收到“空白”消息框..任何帮助将不胜感激
Set xmlObject = CreateObject("Msxml2.DOMDocument.6.0")
urlPath = "C:\Users\...\Desktop\LolChampsSelect.xml"
xmlObject.async = False
xmlObject.load urlPath
'set ban = xmlObject.selectNodes("//*")
set ban = xmlObject.selectNodes("//*")
set ban = xmlObject.selectNodes("//red/ban[@order]
msgbox ban(0).text
文件
<championSelect>
<blue>
<ban order="1" name="Darius"/>
<ban order="3" name="Elise" />
<ban order="5" name="Twisted Fate" />
<pick order="1" name="Gragas" />
<pick order="4" name="Shen" />
<pick order="5" name="Shyvanna" />