What is XML ? Use of XML in ASP.Net.
Use of xml in asp.net. Structure of XML file. XML stands for Extensible Markup Language. The extension of xml file is .xml.
It is a textual data format with strong support via Unicode for the languages of the world.
XML stands for Extensible Markup Language. The extension of xml file is .xml. It is a textual data format with strong support via Unicode for the languages of the world.
The structure of XML is like below:
<Root Element>
<Parent1>
<Child1>...</Child1>
<Child2>...</Child2>
</Parent1>
<Parent2>
<Child1>...</Child1>
<Child2>...</Child2>
</Parent2>
</Root Element>
It means in an XML file only one root element can be possible.
While opening an XML file you will find below line on top of the page:<?xml version="1.0" encoding="UTF-8" ?>
The above line is called XML declaration.
XML is used to store the record in text format. User can store records in XML file in the form of node. As like SQL tables, XML file can be bind with Gridview, Datalist and other asp.net data control. The main benefit of XML is that you can define your own tag, with your own comfort.
see the below example:
<Post>
<Head>
<username>dotnetspider</username>
<id>001</id>
</Head>
</Post>
To the beginners: If you want to learn XML then you must be aware about HTML.
Hello Mr. Srivastava,
Your post is very useful for me.
Actually I was searching for that only.
It helps me.
Thanks for your post.