title: How do I get Node list?
body: <p>Trying to list Nodes with <code>&lt;EventID&gt;1&lt;/EventID&gt;</code> But I get an error
  It is expecting a node test.</p>
  
  <p>I have the following code but when I run it I get the following error:</p>
  
  <p><a href="https://i.stack.imgur.com/6L6Xt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6L6Xt.jpg" alt="error image"></a></p>
  
  <p>Can someone explain what I am doing wrong?</p>
  
  <pre><code>dim xml,node,nodes,Root,strNames
  'Set xml =  CreateObject("Microsoft.XMLDOM")
  Set xml =  CreateObject("MSXML2.DOMDocument.6.0")
  xml.Async = False
  xml.Load "C:\Test\Week\cr_history.txt"
  xml.setProperty "SelectionLanguage","XPath"
  
  
  For Each Node in xml.selectnodes("//DS001History/[@EventID='1']")
    strNames=Node.name
  Next
  msgbox strNames
  </code></pre>