XML Importer [ TestBox & DataGridView ]-VBForums
Results 1 to 1 of 1

Thread: XML Importer [ TestBox & DataGridView ]

  1. #1

    Thread Starter
    Junior Member Alaa Ben Fatma's Avatar
    Join Date
    Dec 2014
    Location
    Tunisia
    Posts
    15

    Resolved XML Importer [ TestBox & DataGridView ]

    Hello guys

    Do you really want to learn how to Load XML database file to TextBox & DataGridView tools ?
    Well , that's why i posted this thread here !

    ScreenShot :
    Name:  ss (2015-01-14 at 10.22.52).jpg
Views: 375
Size:  18.1 KB

    XML's Content :
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <test>
      <TEAM Name="Alaa Ben Fatma" Language="C# | Vb.net " Age="16" /> 
      <TEAM Name="Mahdi" Language="php" Age="20" />  
      <TEAM Name="Mayma" Language="C# | C" Age="20" /> 
    </test>
    How it works ?
    it's all about using tags , for example the TAG i've used in this project is "TEAM"

    SourceCode [ I added it into Form Load Event ] :
    Name:  ss (2015-01-14 at 10.26.10).png
Views: 287
Size:  9.1 KB
    Codes :
    Code:
     XmlReader xmlFile = XmlReader.Create(@"C:\test.xml", new XmlReaderSettings());
                DataSet dataSet = new DataSet();
                dataSet.ReadXml(xmlFile);
               Table.DataSource = dataSet.Tables["TEAM"];
               XMLtxt.Text = File.ReadAllText(@"c:\test.xml");
    Tools used :
    TextBox
    DatagridView

    you can download the .cs file from the Attachements !

    Have fun ^_^

    Created by Alaa Ben Fatma
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.