Section 14.7. What is XML?


14.7. What is XML?

XML is the Extensible Markup Language. It is the universal format for structured information on the Web.

XML is a markup language similar to HTML. Both are simple to write and use and both can be read by humans and by intelligent clients. Both are text formats.

To understand XML and how it differs from HTML, let's step back and consider what we know about HTML:

  • HTML separates data from presentation.

  • HTML describes how data should look when it is viewed in a browser.

  • HTML uses a fixed tag set.

  • HTML tags relate to formatting: how to make text look bold, how to display tables, how to define styles for displaying information, and so on.

XML, on the other hand, separates data from meaning. XML's characteristics include the following:

  • XML has no fixed tag set.

  • XML has no fixed semantics.

  • Instead of tags to describe what data should look like, XML tags define the data itself.

Figure 14-5 shows an XML snippet.

Figure 14-5. An XML-based purchase order


The root element of a purchase order document may have the tag <PurchaseOrder>. The tag describes the data it contains. A <price> element holds the price of an item.

Because the tags define the items that they hold and because XML data is always structured, simple parsers can retrieve the data from an XML document.




Enterprise SOA. Designing IT for Business Innovation
Enterprise SOA: Designing IT for Business Innovation
ISBN: 0596102380
EAN: 2147483647
Year: 2004
Pages: 265

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net