title: Error parsing XML using DOM in VBA
body: <p>I have an XML file from a web service. I'm trying to parse it using Microsoft XML v6 objects in VBA. My code is:</p>
  
  <pre><code>Public Sub LoadDocument()
  Dim xDoc As MSXML2.DOMDocument60
  Set xDoc = New MSXML2.DOMDocument60
  resp = xDoc.Load("c:\xmlsoccer - scot prem.txt")
  Debug.Print xDoc.parseError.errorCode
  Debug.Print xDoc.parseError.reason
  Debug.Print xDoc.parseError.Line
  End Sub
  </code></pre>
  
  <p>resp returns false and the error reason is "Invalid at the top level of the document."</p>
  
  <p>The XML string starts like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;XMLSOCCER.COM&gt;
      &lt;Match&gt;
          &lt;Id&gt;70146&lt;/Id&gt;
          &lt;FixtureMatch_Id&gt;332875&lt;/FixtureMatch_Id&gt;
          &lt;Date&gt;2014-05-11T11:15:00+00:00&lt;/Date&gt;
          &lt;Round&gt;38&lt;/Round&gt;
          &lt;Spectators&gt;17011&lt;/Spectators&gt;
          &lt;League&gt;Scottish Premier League&lt;/League&gt;
          &lt;HomeTeam&gt;Aberdeen&lt;/HomeTeam&gt;
          &lt;HomeTeam_Id&gt;45&lt;/HomeTeam_Id&gt;
      ....
  </code></pre>
  
  <p>I tried deleting the first line but get the same error. Is the text in the right format? Don't know much about XML so not even sure I can load this into the DOM objects.</p>