Take a example..
Private Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.Click
WebBrowser1.Navigate("http://example.com/page.xml")
End Sub
Above code displays the XML content in webbrowser1 control on Button_Click.
But I dont want display in webbrowser. I want read the content from xml document to use elsewhere.
I just need to know how to get this XML file to use elsewhere (other than webbrowser control) from a web address…
Thanks in advance…
The
XmlDocument.Loadmethod can be given either a local file name or a web address URL, for instance:The
Loadmethod of theXDocumentandXElementclasses also work the same way.If you want to get the XML document as a string, so you can parse it through some other means, such as the
XmlSerializer, you can use theHttpWebRequestclass. See this page for an example:http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.getresponse.aspx