' Create new XmlDocument object
Dim objDoc As New System.Xml.XmlDocument()
' Load actual XML
objDoc.Load("c:\filename.xml")
' Create placeholders for node list and individual nodes
Dim objNodeList As System.Xml.XmlNodeList
Dim objNode, objNodeChild As System.Xml.XmlNode
' Retrieve list of article elements
objNodeList = objDoc.GetElementsByTagName("article")
' Cycle through all article elements
For Each objNode In objNodeList
' Display article ID numbers
MessageBox.Show(objNode.Attributes("id").InnerText)
' Cycle through all child node of article
For Each objNodeChild In objNode
' Display article site names
If objNodeChild.Name = "site" Then
MessageBox.Show(objNodeChild.InnerText)
End If
Next
Next
Please SUBSCRIBE to get new articles directly into your Email inbox!
Dim objDoc As New System.Xml.XmlDocument()
' Load actual XML
objDoc.Load("c:\filename.xml")
' Create placeholders for node list and individual nodes
Dim objNodeList As System.Xml.XmlNodeList
Dim objNode, objNodeChild As System.Xml.XmlNode
' Retrieve list of article elements
objNodeList = objDoc.GetElementsByTagName("article")
' Cycle through all article elements
For Each objNode In objNodeList
' Display article ID numbers
MessageBox.Show(objNode.Attributes("id").InnerText)
' Cycle through all child node of article
For Each objNodeChild In objNode
' Display article site names
If objNodeChild.Name = "site" Then
MessageBox.Show(objNodeChild.InnerText)
End If
Next
Next
Please SUBSCRIBE to get new articles directly into your Email inbox!
تعليقات
إرسال تعليق