XML

Extensible Markup Language

A markup language that describes data in a structured and human-readable text format, XML has become the language of choice for information exchange. It is related to HTML, but it is more powerful because XML can be modified and extended. It is important to understand how XML works, because it is used by Aviation Web Services.

Here's an example of some XML:
  <pilot>
    <name>Craig Duncan</name>
    <status>student</status>
    <hours type="dual">37.3</hours>
  </pilot>

XML syntax is very simple, consisting of tagged elements that contain attributes, content, or other elements. In fact, XML is so simple it uses several supporting technologies.

XML Schema

Because XML is so flexible, there needs to be a way to validate that a particular piece of XML adheres to an expected format. An XML Schema file, which is also written in XML, defines which elements are valid and the order they are allowed to be placed. This is just like a definition in a dictionary which uses a description written in English to define an English word.

There is an older technology called Document Type Definitions (DTD) that is also used to validate XML. However, it does not use XML and is starting to fall out of favor.

Namespaces

Namespaces allow the same element name to be used in different XML Schemas. For example, a developer working on an electronic logbook might create the tag "<hours>" to indicate the number of hours a pilot has flown. Suppose another developer working on a flight school application has already used "<hours>" to track the number of hours spent in ground school. If the electronic logbook uses XML data from the flight school application, there will be a conflict. If the first developer declares a "logbook" namespace and appends it in front of the element name, the problem is avoided. The tag would now be "<logbook:hours>".

XSLT

Extensible Stylesheet Language Transformations (XSLT) is a language written in XML that allows XML documents to be converted into other formats. The most common use of XSLT is to transform XML into HTML for use on the Web. However, XSLT can also be used to transform an XML file into VoiceXML, WAP, an Adobe Acrobat PDF file, etc.

XPath

XPath is a powerful query language that is used by XSLT. It is similar in concept to a database query language called SQL. However, the syntax is very different. It is better than SQL at finding semi-structured data, which most XML files contain.

Uses

XML and its supporting technologies have many uses. For example, this website uses XML with Namespaces to store information, XPath to query that information, and XSLT to transform it into an XML-compliant version of HTML called XHTML. However, the most important use of XML is to create Web services.

Technologies

Web services

Web services

Software components that can be published, located, and run over the Internet using Extensible Markup Language (XML).

Links

Articles

XML and the Second-Generation Web

XML Exposed

Standards organizations

W3C

XML.org

Resources

XML.com

Microsoft

OASIS

More links...