Sunday, December 23, 2012

XML : Extensible Markup Language


We had learned in the class about Extensible Markup Language (XML). The definition of XML is to transport and store data with focus on what data is. This XML language is similar as HTML language. But, the XML is not a replacement for HTML. The function of HTML is to display data with focus on how data looks. The XML also can be described as a software and hardware independent tool for carrying information.

Example of an XML Document

Input

<note>
<to>Ahmad</to>
<from>Abu</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>

Output

To: Ahmad

From: Abu

Reminder: Don’t forget me this weekend



XML Syntax Rules:
  • All XML elements must have a closing tag
       Examples:  
          
     <p>This is a paragraph</p>
     
     <p>This is another paragraph</p>


XML Tags are Case Sensitive
       Examples:

  <message>This is incorrect</message>
  <message>This is correct</message>


XML Elements Must be Properly Nested
  • It must be at properly nested


     Example:

   <b><i>This text is bold and italic</i></b>






Reference

No comments:

Post a Comment