0
你好我正在嘗試從xml節點之間循環,但出於某種原因,我只得到第一個節點任何想法將不勝感激! XML:通過XML節點的VBA循環
<root>
<AC>
<answer id ="c1">
blue
</answer>
<answer id ="c1">
blue
</answer>
</root>
VBA代碼:
Set ques = getQues(qName) 'ques is in CreateObject("MSXML2.DOMDocument") format
Set nodes = ques.SelectNodes("/root/AC")
For Each node In nodes
MsgBox (node.SelectSingleNode("answer").Text)
Cells(i + 1, j).Value = node.SelectSingleNode("answer").Text
Next node
謝謝您的幫助!
你的XML不能很好地形成 - 缺少收盤'' –