Home > Software engineering >  Microsoft. XMLDOM question, give advice or comments
Microsoft. XMLDOM question, give advice or comments

Time:11-03

Public Function openxml (filename As String) As script
Dim xmldoc As New DOMDocument 'error here, undefined user defined types, this how to break

The Set xmldoc=CreateObject (" Microsoft. XMLDOM)

Xmldoc. Load filename

The Set xmlRoot=xmldoc. DocumentElement
For Each childItem In xmlRoot..childnodes

If childItem. The BaseName="SystemArea" Then
For Each area In childItem..childnodes
Debug. Print area. The Attributes. GetNamedItem (" name "). The NodeValue
Next
End the If
Next
End the Function

CodePudding user response:

By the way, CreateObject (" Microsoft. XMLDOM)
I want to pass a node as a parameter to another function, how do I know the type of node

CodePudding user response:

Reference msxml6. DLL:
Microsoft XML, v6.0
  •  Tags:  
  • VBA
  • Related