How to XML in C#

XML is a general purpose tag based language and very easy to transfer and store data across applications. Like HTML , XML is a subset of SGML (Standard Generalized Markup Language). XML is a platform independent language, so the information formatted in XML can be used in any other platforms (Operating Systems). XML is a self describing language and it gives the data as well as the rules to identify what information it contains.

XML files are made up of tags that contains data. Generally a start tag and end tag to hold the data. For example, if you want to create an XML tag name "Header" , the start tag is like < Header > and the end tag is like < /Header > . We can fill our information between these tags.

While creating an XML file , some important points have to remember :

* XML is case sensitive

ex: < Header > is not same as < HeadeR > .

* Tags must be closed in the reverse order that they were opened

ex : < first-tag >< second-tag > Data here < /second-tag > < /first-tag > .

Sample XML File


The .Net technology is widely supported XML file format. The .Net Framework provides the Classes for read, write, and other operations in XML formatted files . These classes are stored in the namespaces like System.Xml, System.Xml.Schema, System.Xml.Serialization, System.Xml.XPath, System.Xml.Xsl etc. The Dataset in ADO.NET uses XML as its internal storage format.

You can use any text editor to create an XML file . More over XML files are readable by humans as well as computers. From the following links you can see how to use XML in C# Programming Language.
 (C) 2021    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.
SiteMap  | Terms  | About