XML vs. |
How XML applications differ from HTML In HTML, pieces of information are tagged in terms of how they fit in the structure of the document and how they should be formatted. Is it a heading? Or a paragraph? Should it be bold? Or italic? Is it a link? Is it part of a table? If so, is it in the first row or the second row? And so on. The following is a very simple example.
In XML, pieces of information are tagged with descriptive terms that have meaning for the context of the information. The tags identify the type of information they contain. The tags also are used to indicate a relationship between pieces of the information. The above listing of Dr. Doe's Patients, rewritten in an XML application, might look like this:
XML doesn't deal with layout and format; those aspects of document creation are handled by stylesheets. XML is meant to simply identify chunks of information in a meaningful way. Markup tags are nested within each other; inner tags are more specific identifiers of the information. Information delivered through an XML application will be more accessible and reusable than the same information delivered through HTML, because the information is given meaning through its tags. XML and HTML: A side-by-side comparison
|