Dim doc As New XMLDocument() compile error

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
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()<br/>
Dim nodes As XmlNodeList
doc.Load ("C:xl_xml_data.xml")<br/>
XmlNodeList = doc.ChildNodes
For Each Node In nodes<br/>
If (Node Is Nothing) Then<br/>
nod.ParentNode.ParentNode.RemoveChild (nod.ParentNode)<br/>
End If<br/>
Next
End Sub

View the full article
 
Back
Top