Wednesday, 21 August 2013

How to search and display XML file in browser

How to search and display XML file in browser

I'm looking for ways to display XML file in browser by using asp.net method.
Below is the code that I'm using to search for any .XML file with the word
"verify" as its title.
Now, I'm just wondering if there is a way to display the XML file in the
web browser.
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
'To find subdirectories with a specific pattern/WILD CARD
'ms-help://MS.VSExpressCC.v80/MS.NETFramework.v20.en/dv_vbcn/html/c9265fd1-7483-4150-8b7f-ff642caa939d.htm
'Me.ListBox1.Items.Clear()
Dim path As String = "\\g1w6223c\e$"
Dim searchPattern As String = "*verify*.xml"
For Each value As String In My.Computer.FileSystem.GetFiles(path,
FileIO.SearchOption.SearchAllSubDirectories, searchPattern
)
ListBox1.Items.Add(value)
TextBox1.Text = "found"
Next
End Sub

No comments:

Post a Comment