From WikiEducator
Jump to: navigation, search
Home  |  About UOU  |  About CEMCA  |  Contact Us    

Unit 3.3 Web application development tools & Technologies

3.3.4 XML XML document structure XML element naming rules Important rules to keep in mind while creating XML document Viewing a XML document Displaying XML with XSLT

3.3.4 XML Document Structure

XML document form a tree structure, and self describing and simple syntax.

<?xml version="1.0" encoding="UTF-8"?>
        <name> Aakash Rathore </name>
        <company> ABC Ltd. </company>
        <phone> 234567 </phone>

The first line is the XML declaration defines the XML version (1.0) and the encoding used UTF-8 (Unicode).

The document contains two types of information:
            1. Markup, like <contact-detail> and <name> etc.
            2. Character data, like “Aakash Rathore” and “234567”

XML document must contain root element. The root element is parent to all other elements. In the above example <contact-detail> tag is root tag.
XML tags must have the start and end of elements; tags are the logical units of information in an XML document.

XML Comments

Syntax of XML comments is
<!- - Comment - ->

Suggested Reading
  • Web Applications

 Suggested Videos
  • Video 01 Title
  • Video 02 Title
  • Video 03 Title