How do I get data from an XML file in VB.NET Express 2005?

How do I get data from an XML file in VB.NET Express 2005

I'm making a program that gets data from an XML file when the user clicks a search button. The collected data would be displayed in text boxes.


Answer this question

How do I get data from an XML file in VB.NET Express 2005?

  • TheViewMaster

    i have the same problems, i wanna read and write XML file! what would i do
    needs "Imports System.Xml... or .." ,but i can't find it.
    please help!



  • Chris R Jones

    You can also use the System.DAta.DataSet class, and its ReadXml method.

    Dim myDataSet As System.Data.DataSet
    myDataSet.ReadXml("c:\xmlfiles\xmlfile.xml")
    TextBox1.Text = myDataSet.Tables(0).Rows(0)("FirstColumnName")


    Hope that helps too!  System.XML is good for more complex XML files also.

    S



  • Nate

    You need to add a reference to the System.Xml.dll file and then use Imports System.Xml to import the classes for that namespace.  Those classes are used to read xml.

  • How do I get data from an XML file in VB.NET Express 2005?