O'Reilly logo

Web Technology: Theory and Practice by M. Srinivasan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

8.3 XML BUILDING BLOCKS

The fundamental building blocks of XML are Tags (Elements), Attributes and Namespaces. Like HTML, it is also derived from SGML. Tags have content between them (start and end tags). Attributes describe about the Tag, without having to add additional tags! For example, type is an attribute with value of CDMA.

<mobile type=“CDMA”>
<provider>Reliance</provider>
</mobile>

Namespaces define the domain. They are important because they avoid name collisions, given the fact that XML definitions can be developed independently. For example, if some entity called JAVA is being defined through XML, it could refer to a definition pertaining to the programming language Java or to an island called Java. Namespaces come to the rescue to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required