Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Add to very top of form:
- Imports System.IO
- Imports System.Xml
- Add inside load XML button:
- If (ComboBox1.Text = "") Then
- MessageBox.Show("No file name entered")
- Else
- If (System.IO.File.Exists(ComboBox1.Text.ToString())) Then
- Dim document As XmlReader = New XmlTextReader(ComboBox1.Text.ToString())
- While (document.Read())
- Dim type = document.NodeType
- If (type = XmlNodeType.Element) Then
- If (document.Name = "Name") Then
- xmlMyName.Visible = True
- xmlMyName.Text = document.ReadInnerXml.ToString()
- End If
- If (document.Name = "Email") Then
- xmlMyEmail.Visible = True
- xmlMyEmail.Text = document.ReadInnerXml.ToString()
- End If
- If (document.Name = "Tel") Then
- xmlMyTel.Visible = True
- xmlMyTel.Text = document.ReadInnerXml.ToString()
- End If
- If (document.Name = "Notes") Then
- xmlMyNotes.Visible = True
- xmlMyNotes.Text = document.ReadInnerXml.ToString()
- End If
- End If
- End While
- Else
- MessageBox.Show("The filename you selected was not found.")
- End If
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement