SHARE

What is XML

XML is a language to create web pages . It stands for Extensible Markup Language . It is used for store , carry and exchange data .

This format is used to create common information formats .It is also is used to share and retrieve  data from the World Wide Web .

XML can’t used to display data like HTML . So it is different from HTML . It is used to create new Modular languages . It is started with tags and it also must have closing tags like HTML .

 XML Structure

XML havc structured like HTML .It have a header . This header tells the browser ,that it has an XML file and its version . After that it have a root element and child elements .

<?xml version="1.0" encoding="UTF-8"?>
<liberary> <hindi>supercop</hindi> <english>tom teller</english> <french>moraco</french> <german>temptation</german>
</liberary>

In this example

<?xml version="1.0" encoding="UTF-8"?>

is header of XML . It tells the browser that this is a Extensible Markup Language document and its version is 1.0 . encoding = “UTF-8” is optional .

XML Tags Are Case Sensitive

In the next line tag <liberary> is the root element . All the elements between <liberary> </liberary> are child elements .

Extensible Markup Language is case sensitive . That means if <german> and  </German> these are different . This cause error in the document .

As same <scoobyDo> </scoobyDo> and <scoobydo> </scoobydo> both are different tags . If user use <scooby></Scooby> then is show error . So it means if start tag is not properly matched with end tag then this cause errors .

Strict language

test.xml looks in internet explorer
test.xml looks in internet explorer

This is very strict language . As in HTML and properly un closed tags are also working ,But in XML non closed and miner mistakes are also show errors .

To see how to XML file looks in browser . Open notepad in your pc . Copy the above code in notepad . Save as this test.xml on desktop .

Double click on the file on desktop . This will open in your web browser . Your test.xml looks like image shown above .

Video Help

Click here to see the video how to create an xml file .