(Thanks in advance for the pointer(s)) />/>
1. User searches for the .xml file
2. User clicks Export (THIS IS WHERE I'm stumped)
How do I invoke or pull from the C:\Users\username\Desktop\userxmlfile.xml that's within the textbox control once the user selects the file? I can't seem to find anything on the net or the proper terms for it? How to tell btnExport to open the file that's in the textcontrol.
(I'll try to figure this out, but a pointer on whatever is best to use to read XML files would be appreciated.) Then I can start using Streamreader and Regex to pull out a certain "NODE" of the XML file.
3. After this is preformed it should populate the ListBox control
4. Then the user can click to save this to a .txt file as a list.
I'm not looking for a full working concept of this, I want the challenge on completing this by myself, but I'm sorta lost on how and what to look for here... Since .net seems so huge.
Here's the code that I have so far, however I can't seem to find any information on when I press btnExport_Click, I need to have it select what's in the txtFile control:
Public Class frmMainExtractor Property Filter As String Private Sub btnFindFile_Click(sender As Object, e As EventArgs) Handles btnFindFile.Click OpenFileDialog1.Title = "Please select your XML file..." OpenFileDialog1.InitialDirectory = "C:temp" OpenFileDialog1.ShowDialog() End Sub Private Sub OpenFileDialog1_FileOk(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk Dim strm As System.IO.Stream strm = OpenFileDialog1.OpenFile() txtFile.Text = OpenFileDialog1.FileName.ToString() If Not (strm Is Nothing) Then strm.Close() MessageBox.Show("File Successfully Selected.") End If End Sub Private Sub btnExport_Click(sender As Object, e As EventArgs) Handles btnExport.Click ' Node in XML to search for: <Combo>Ctrl+Alt+3</Combo> which uses the Combo so a regex is needed between the Combo node more than likely. End Sub End Class
Here's an image of the layout for the visual ones on where I'm stumped if you need: