C# Tutorials: What is XML

XML(Extensible Markup Language) is an universal specifation / standard by W3C providing context / description and structure to the otherwise ordinary text data.

XML can be used for exchanging information between objects developed in different programming languages and running on discreate platforms and even if the objects are separed by the firewall.The XML standard was created by W3C to provide an easy to use and standardized way to store self-describing data.

Rules for designing an XML File
1. It should have only one root element (tag) in XML document.
2. The tags used in XML file are case sensitive and hence the opening and closing tag case must match with each other.
ex: - <test></test>-Correct
<test></Test>- InCorrect
3. Every tag must be closed. ex:</test>
4. Tags must not overlap with each other. Ex:<test><demo> Demo</test></demo> is invalid
5. The value of attributes must be encosed in quotes (single or double) Ex:RollNo=“10”
6. An HTML document which is well formed is called XHTML

Visit Interview Questions at Bestdotnettraining for getting the best interview questions

Comments