Friday, 7 November 2014

XML


XML stands for Extensible markup language. It is a specification for storing information. Unlike HTML, XML don’t have predefined tags, User can create custom tags by following the rules of XML.

Books.xml
<?xml version="1.0"?>
<books>
 <book>
  <name>Let Us C</name>
  <author>Yashwant Kanetkar</author>
  <price>245.00</price>  
 </book>
 <book>
  <name>Let Us C++</name>
  <author>Yashwant Kanetkar</author>
  <price>252.00</price>  
 </book>
 <book>
  <name>Java The Complete Reference</name>
  <author>Herbert Schildt</author>
  <price>489.00</price>  
 </book>
 <book>
  <name>HTML5 Black Book</name>
  <author>Kogent Learning Solutions</author>
  <price>485.00</price>  
 </book> 
</books>


As you see above xml document, it describes about books details. ‘<books>’ is the root tag. The tags and data between ‘<book>, </book> describes about the book name, author and price of the book. All the tags like <books>, <book>, <name>, <author>, <price> are custom tags. XML main usage is storing and transporting the information across web.


Prevoius                                                 Next                                                 Home

No comments:

Post a Comment