Hi there to all
I'm trying to make application which should extract certain data from XML files. I'm using form, combobox and button.
If someone could guide me because I'm not so familiar with programming...
here is code example
To populate Combobox1 and it works fine
Private Sub form1_load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim strpath As String = System.IO.Path.GetDirectoryName(Application.ExecutablePath) & "\"
Dim dirinfo As New IO.DirectoryInfo(strpath)
For Each file As FileInfo In dirinfo.GetFiles("*.XML", SearchOption.TopDirectoryOnly)
ComboBox1.Items.Add(file.Name)
Next
This code should choose file from combobox1 and do READ some data from file I have choosen
Private Sub button1_click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim xmldoc As New XmlDataDocument()
Dim xmlnode As XmlNodeList
Dim i As Integer
Dim str As String
Dim fs As New FileStream("GET_FILE_FROM_COMBOBOX1", FileMode.Open, FileAccess.Read)
xmldoc.Load(fs)
xmlnode = xmldoc.GetElementsByTagName("")
For i = 0 To xmlnode.Count - 1
xmlnode(i).ChildNodes.Item(0).InnerText.Trim()
str = xmlnode(i).ChildNodes.Item(0).InnerText.Trim() & " " &
xmlnode(i).ChildNodes.Item(1).InnerText.Trim() & " " &
xmlnode(i).ChildNodes.Item(2).InnerText.Trim()
MsgBox(str)
Next
_____
And one last thing ... I'm using MS Visual Studio Community 2015, and can't fogure out where is my ".exe" file, or it is not generated couse errors I'm getting?