1 XML was designed to transport and store data.
HTML was designed todisplay data.
XML was designed to transport and store data, with focus on what data is
HTML was designed to display data, with focus on how data looks
XML is a software- and hardware-independent tool forcarrying information.
2 XML tags are not predefined. You must define your own tags
3 XML is used in many aspects of web development, often to simplify data storage and sharing.
4 XML documents form a tree structure that starts at "the root" and branches to "the leaves".
Example:
<bookstore>
<book category="COOKING">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book category="CHILDREN">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book category="WEB">
<title lang="en">Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>