I am trying to remove blank nodes from a XML file using Excel 2007 macro. I get a compile syntax error on line 1 of my code below. I have XML vs 6.0 as a reference. What am I missing?
Sub RemoveEmptyNodes()
Dim doc As New XMLDocument()
Dim nodes As XmlNodeList
doc.Load ("C:\xl_xml_data.xml")
XmlNodeList = doc.ChildNodes
For Each Node In nodes
If (Node Is Nothing) Then
nod.ParentNode.ParentNode.RemoveChild (nod.ParentNode)
End If
Next
End Sub