|
|
XML |
XML is a meta-markup language that provides a format for describing structured data.
Web pages are written in HTML. There are some similarities between HTML and XML:
both were derived from SGML; both use a plain-text encoding; both use tags
of the form <tagname>.
However, that is where the similarities end, because they serve very different purposes.
HTML is concerned with layout of the data (but not the data itself), and an HTML document
uses a subset of the fixed set of tags defined in the HTML standards.
XML is concerned with the structure and content of the data (but not the layout),
and an XML document uses a set (or subset) of tags which have been specifically designed
for the purpose (ie are application-specific). For instance, the tag <partdesc>
may be used to indicate that the data enclosed by such a tag constitutes a 'part description'.
The fact that the tags are application-specific implies that there has to be some agreement about, or definition of, the structure of the data, the data field types and the actual tag ids to be used. Once agreed/defined, instances of XML documents can then be created using these tags. Generally, the definition is kept in a separate file, referred to as a DTD (data type definition) or schema. However, for simple application exchanges, it can be embedded within an instance of the XML document or defined in some other form.