​​​​​​​​A simple XML example​


​​​​​​​​​​​<?xml version=”1.0″ encoding=”ISO-8859-1″?>​
​<techie_1991>​
​​
​​
​​

    ​​​​​<name>Ayush</name>​​​​​​​​​
    ​​
    ​​
    ​​​​​<email>ayushgoelblog@gmail.com</email>​​​​​​​​​
    ​​
    ​​
    ​​​​​<country>India</country>​​​​​​​​​
    ​​
    ​​
    ​​

​​​​​</techie_1991>​
​​
​The first line is the XML declaration. It defines the XML version (1.0) and the encoding used (ISO-8859-1 = Latin-​
​1/West European character set).​
​​
​The next line describes the root element of the document (like saying: “this document gives details of ​
​techie_1991”):​
​<techie_1991>​
​The next three lines give the details:​
​​
​​
​​

    ​​​​​<name>Ayush</name>​​​​​​​​​
    ​​
    ​​
    ​​​​​<email>ayushgoelblog@gmail.com</email>​​​​​​​​​
    ​​
    ​​
    ​​​​​<country>India</country>​​​​​​​​​
    ​​
    ​​
    ​​

​​​​​And the last line gives the end of root tag/element:​
​</techie_1991>​
​​
​XML documents form a tree data structure. The root has child tags and child tags can have more child tags. ​
​These child tags share the relation of siblings. Actually, speaking in one line, they are related as a family with ​
​parents, children, grandparents, siblings and many more…​
​​
​​
​​​

Advertisements
Explore posts in the same categories: XML

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: