PGDEL/DECP03/Unit3/13

From WikiEducator
< PGDEL‎ | DECP03‎ | Unit3
Jump to: navigation, search



Unit 3.3 Web application development tools & Technologies
XML Document Structure

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

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

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 - ->

Road Works.svg Work in progress, expect frequent changes. Help and feedback is welcome. See discussion page. Road Works.svg