Reading and Writing XML File

XML is an extensible markup language

XML is a text-based markup language that is fast becoming the standard for data interchange on the Web. HTML emphasis on presetation of data and XML emphasis on the Data itself. Like HTML, you identify data using tags (identifiers enclosed in angle brackets: (<...>). Collectively, the tags are known as markup. Each starting tag must have a closing tab. This is case sensitive, the opening and closing tags must match exactly and the data will come between the opening and the closing tags.

<sample> data </sample>

If there is no data i.e. empty tag then you can also write it as

<sample/>

if you are writing
<sample>
<data>this is data</data>
</sample>
this can also be written as

<sample data="this is data"/>

where data is called an attribute and its values must be enclosed in inverted commas.

<!-- This is a comment -->

sample xml file
<?xml version='1.0' encoding='utf-8'?>
<!-- A SAMPLE set of slides -->
<slideshow>
<title>c#</title>
<author>ajay</author>
<address>
<doorno>123</doorno>
<street>23</street>
</address>
<noofslides>1</noofslides>
</slideshow>

can also be written as
<?xml version='1.0' encoding='utf-8'?>
<!-- A SAMPLE set of slides -->
<slideshow title="c#" author="ajay" noofslides="1"/>

You can use the dataset object to directly read or write xml files.
once the dataset has tables and data in it just call its writexml or writexmlschema method giving the name of the file to be created.
this will generate the xml/xmlschema automatically.
if you are having xml file then you can display its contents using dataset. call the dataset's readxml method with the filename as the xmlfilename to be read.