|Joel Sklar Consulting||Home|
What is XML?
A brief primer on XML
XML resource links
Sample XML code
XML is a subset of SGML, the Standard Generalized Markup Language. XML is a meta-language that allows you to create your own elements that meet your information needs. XML provides a format for describing structured data that can be shared by multiple applications across multiple platforms.
The power of data representation in XML comes from the separation of display and style from the structure of the data. XML elements describe data and structure only. HTML contains elements that describe a word as bold or italic; XML declares an element to be a book title, an item price, or a product measurement. Once the data is structured in XML it can be displayed across a variety of media using an associated style sheet that contains the display information. You can use to Cascading Style Sheets (CSS) to add display information to your XML data or the Extensible Style Language (XSL) to transform documents into other markup languages.
Here's a sample of some typical XML code. Notice that the element names describe the data. XML syntax is stricter than HTML syntax. Element names are case sensitive; all elements must be closed and nested properly. Empty elements, such as <location code=“F5-Row3”/> are signified with a closing slash. Empty elements like this can pass information to a processing application. If you have Internet Explorer 5.0 or greater, you can view this xml file directly in your browser
<books> <book> <location code="F5-Row3"/> <title>All about XML</title> <author>Xavier M. Elle</author> <publisher>ITP</publisher> <isbn>30-86956-88</isbn> <price currency="US">37.95</price> </book> </books>
XML is valuable because it provides access to more meaningful searches for information, allows development of flexible applications, allows multiple views of data, and is based on a non-proprietary standard that supports the open nature of the web.
XML code is readable by both machines and people. Some years from now a person could open your XML file and understand what you meant when you used <headline> and <author> as markup elements. The cross-platform, independent nature of XML markup supports a wide variety of data applications migrating to the web. Your data can be displayed on a variety of devices without changing the essential data descriptions.
XML is ideal for sharing complex, esoteric information among large numbers of users sharing the same knowledge area. Through the construction of a Document Type Definition (DTD)or XML Schema, standards organizations for various industries and information types can enforce the use of markup constraints with all of their users. Chemists can have their own chemical markup language, poets can have their own poetic markup language - ensuring that their content can be read and understood by anyone interested in their information type.