Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim doc As New XmlDocument
doc.Load("archivo.xml")
Dim xml_nodos As XmlNode = doc.GetElementsByTagName("IdDoc")(0)
Dim array() As String = Nothing
For Each elem As XmlNode In xml_nodos
array = {"", False, False, False, False, False}
array(0) = elem.Name
Dim dte() As Integer = elem.InnerXml.Split(",").Select(Function(x) Int32.Parse(x)).ToArray
For Each tipo_dte In dte
Select Case tipo_dte
Case 33
array(1) = True
Case 34
array(2) = True
Case 39
array(3) = True
Case 56
array(4) = True
Case 61
array(5) = True
End Select
Next
DataGridView1.Rows.Add(array)
Next
'Dim xml As New Xml.XmlTextReader("archivo.xml")
'While xml.Read
' If xml.NodeType = System.Xml.XmlNodeType.Element Then
' MessageBox.Show(xml.Name)
' End If
'End While
End Sub
No hay comentarios.:
Publicar un comentario