Reusing Content with Templates and Libraries > Exporting and importing XML content > About XML |
XML is the Extensible Markup Language, a markup language for structured documents. You can think of it as being like a generalization of HTML that lets you define your own tags. XML is derived from SGML, the Standard Generalized Markup Language; like SGML, XML is a language for defining sets of tags and the relationships among them.
Tags in XML look similar to HTML tags: they consist of a tag name plus optional attributes, surrounded by angle brackets. As with HTML, an opening tag and a closing tag (in which the tag name is preceded by a slash) are used to mark the content between the tags. One syntactical difference is that in XML, an empty tag (one that uses only a single tag, such as <img>
, instead of an opening tag and a closing tag containing text or other material) must end with a slash just before the closing angle bracket. For example, an <img>
tag in XML might look like this:
<img src="test.png" />
True XML is much stricter and less forgiving about its syntax than HTML is; files that do not strictly conform to XML syntax are rejected by XML parsers.
XML provides a way to mark literal strings, which can include tags that should not be parsed: an element called a CDATA
section, which includes a literal string in square brackets. Anything inside the square brackets is not parsed by the XML parser. Dreamweaver's exported XML makes extensive use of CDATA
sections.
A full introduction to XML is beyond the scope of this book. For more information about XML, see the XML.com Web page.