Dim doc As New XmlDocument()
doc.Load("usuarios.xml")
For Each node As XmlNode In doc.GetElementsByTagName("id")
MessageBox.Show(node.InnerText)
Next
opción 2
Dim xdoc As XDocument = XDocument.Load("usuarios.xml")
For Each element As XElement In xdoc.Descendants()
If element.Name.ToString.Contains("id") Then
MessageBox.Show(element.Value)
End If
Next
No hay comentarios.:
Publicar un comentario