XML documents have list1 and list2 these two nodes, I just want to get list1 below two records, and displayed in the form controls, how to do? (figure in the table in the control's content, to illustrate the effect of mandatory added manually, not by XML file read)
The following for the content of the XML document:
<? The XML version="1.0" encoding="utf-8"?>
- & lt; Mkryxx>
- & lt; The item id="1" & gt;
- & lt; The item id="2" & gt;
- & lt; List2 & gt;
- & lt; The item id="1" & gt;
- & lt; The item id="2" & gt;
CodePudding user response:
Sub Command1_Click ()
Set the Dom=CreateObject (" Microsoft. XMLDOM)
Dom. Async=False
The Dom. The Load "C: \ Documents and Settings \ Administrator \ \ desktop a.x ml"
Set the Node=Dom. SelectSingleNode (" mkryxx "). SelectSingleNode (" list1 ")..childnodes (1)
For Each Node In x..childnodes
The Debug. Print x.T ext
Next
End Sub
CodePudding user response:
Useful to me, thank you!