XML, short for Extensible Markup Language, has often been described as a customizable version of HTML. Although this depiction is accurate to a degree, it doesn't really go far enough to distance it from HTML and characterize the language's strengths. To me, XML is pure structure. Each XML tag is only present to contribute to the structure of a document. Better still, the very name of each XML tag describes the content it contains, furthering the structural integrity of the document. XML files begin with a statement that declares the XML version used. By default, Dreamweaver MX creates XML version 1.0 documents that specify the encoding: <?xml version="1.0" encoding="iso-8859-1"?> Internally, XML syntax is similar to HTML with a few key differences:
<![CDATA[To designate a table of contents item, enclose the entry with a <toc>...</toc> tag pair.]]> Structurally, XML documents tend to be made up of multiple sets of tags following the same format. For example, if I were to describe a series of books I've read, the basic form might look like this: <?xml version="1.0" encoding="iso-8859-1"?> <books> <book> <bookTitle name=""> <authorName name=""> <bookDescription> <![CDATA[]]> </bookDescription> <book> </books> With a number of entries completed, the XML file would look like this:
In this example, the overall structural element is the <books> tag, which has three nodes or children in the <book> tags. Within each <book> child, the same descriptive tags are used with varying values. We'll see this exact type of format when we examine XML documents that are exported from Dreamweaver. |