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 :
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 ] :
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