title: How to parse XML in VBA Excel 2003?
body: <p>I am trying to parse a general XML file, via VBA.  What I want to do with it: extract the values of the xml nodes, write them into a XML file and export it.</p>
  
  <p>Do you know any library that actually lets me read one node at a time, for me to process with a understandable documentation, and some examples, even minimal ones.</p>
  
  <p>So far:</p>
  
  <pre><code>Sub Go()
  
      Dim xmlDoc As MSXML2.DOMDocument
      Dim xmlElement As MSXML2.IXMLDOMElement
      Dim xmlNode As MSXML2.IXMLDOMElement
  
      Set xmlDoc = New MSXML2.DOMDocument
      xmlDoc.Load ("E:\cdCatalog.xml")
  
      Set xmlElement = xmlDoc.documentElement
      Set xmlNode = xmlElement.FirstChild
  
      parseNodes xmlElement, 1, 1
      'parseNodes xmlNode, 1, 1
  
  End Sub
  
  Sub parseNodes(node As MSXML2.IXMLDOMElement, i As Integer, j As Integer)
      Dim child As MSXML2.IXMLDOMNode
  
      'result = node.baseName &amp; " : " &amp; node.Text
      result = node.nodeName
  
      Sheet1.Activate
      ' text if...
      Cells(i, j) = result
  
      j = j + 1
      If (node.hasChildNodes) Then
  
          For Each child In node.childNodes
              i = i + 1
              'MsgBox child.Text
              MsgBox TypeName(node.childNodes)
              parseNodes child, i, j
          Next
      End If
  
  End Sub
  </code></pre>