title: why does Msxml DocumentElement/SelectSingleNode returns nothing?
body: <p>The DocumentElement property and the SelectSingleNode keep on returning nothing, I have verified that the xml loads correctly, the problem seems to lie in the xml parser. The xml does not have any namespaces so it shouldn't needed to be set.   </p>
  
  <pre><code>Private Function ParseWord(word As String) As String
      Dim tempFile As String
      tempFile = Environ("temp") &amp; "\" &amp; "temporaryWord" &amp; ".xml"
      Call CreateFile(tempFile, word)
  
      Dim xmlDoc As Object
      Set xmlDoc = CreateObject("MSXML2.DOMDocument.6.0")
  
      With xmlDoc
       .async = False
       .setProperty "SelectionLanguage", "XPath"
       .validateOnParse = False
       .Load tempFile
       '.setProperty "SelectionNamespaces", ""
       '.Namespaces = False
      End With
  
      Dim xmlElement As Object
      Set xmlElement = xmlDoc.DocumentElement
  
      If xmlElement Is Nothing Then
          MsgBox "error in element"
          Exit Function
      End If
  
      Dim nodeXML As Object
      Set nodeXML = xmlElement.SelectSingleNode("/definitions/definition/text")
  
      If nodeXML Is Nothing Then
          MsgBox "error"
      Else
          MsgBox nodeXML.Text
          ParseWord = nodeXML.Text
      End If
  
  End Function
  </code></pre>
  
  <p>xml source :<a href="http://api.wordnik.com/v4/word.xml/intransigent/definitions?limit=200&amp;includeRelated=true&amp;useCanonical=true&amp;includeTags=false&amp;api_key=a2a73e7b926c924fad7001ca3111acd55af2ffabf50eb4ae5" rel="nofollow">http://api.wordnik.com/v4/word.xml/intransigent/definitions?limit=200&amp;includeRelated=true&amp;useCanonical=true&amp;includeTags=false&amp;api_key=a2a73e7b926c924fad7001ca3111acd55af2ffabf50eb4ae5</a></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;definitions&gt;&lt;definition sequence="0"&gt;        &lt;textProns/&gt;&lt;sourceDictionary&gt;ahd-legacy&lt;/sourceDictionary&gt;&lt;exampleUses/&gt;&lt;relatedWords/&gt;&lt;labels/&gt;   &lt;citations/&gt;&lt;word&gt;intransigent&lt;/word&gt;&lt;attributionText&gt;from The American Heritage® Dictionary of the English Language, 4th Edition&lt;/attributionText&gt;&lt;text&gt;Refusing to moderate a position, especially an extreme position; uncompromising.&lt;/text&gt;&lt;partOfSpeech&gt;adjective&lt;/partOfSpeech&gt;&lt;score&gt;0.0&lt;/score&gt;&lt;/definition&gt;&lt;/definitions&gt;
  </code></pre>
  
  <p>The createFile function is from here:</p>
  
  <p><a href="http://www.jpsoftwaretech.com/vba/msxml-object-library-routines/#createfile" rel="nofollow">http://www.jpsoftwaretech.com/vba/msxml-object-library-routines/#createfile</a></p>