Total Pageviews

Thursday, 28 March 2013

XML Syntax Rules



•       All XML Elements Must Have a Closing Tag
–      In HTML, some elements do not have to have a closing tag:
–      Like <p>This is a paragraph.
–       <br>--------------
•       XML Tags are Case Sensitive
–      XML tags are case sensitive. The tag <Letter> is different from the tag <letter>.
                Example:             <Message>This is incorrect</message>
                                                <message>This is correct</message>
•       XML Elements Must be Properly Nested
–      <b><i>This text is bold and italic</b></i>[ improper]
<b><i>This text is bold and italic</i></b> [Proper]


•       XML Documents Must Have a Root Element
•       <root>
  <child>
    <subchild>.....</subchild>
  </child>
</root>
•       XML Attribute Values Must be Quoted
•       <note date=“ 12/03/2012 ">
   <to>Principal/to>
  <from> MCA Students</from>
</note> 

No comments:

Post a Comment