Optical Disc Technology  » Beginning XML - Part III (Building Blocks)

Beginning XML - Part III (Building Blocks)

XML documents (and HTML documents) are made up by the following

building blocks:

· Elements

· Tags

· Attributes

· Entities

· PCDATA

· CDATA

· Elements...

This is a brief explanation of each of the building blocks:

Elements

Elements are the main building blocks of both XML and HTML

documents.

Examples of HTML elements are "body" and "table". Examples of XML

elements could be "my-schedule" and "date". Elements can contain

text, other elements, or be empty. Examples of empty HTML

elements are "hr", "br" and "img".

Tags

Tags are used to markup elements.

A starting tag like mark up the beginning of an

element, and an ending tag like mark up the end

of an element.

Examples:

A body element: body text in between