anguage) The most widely used semi-structured format for data, introduced by the W3C in 1998. XML files contain only tags and text similar to HTML. However, whereas HTML defines how elements are displayed and printed, XML assigns meaning to the elements. HTML uses predefined tags, but XML requires the developer of the content to define most of the tags. Thus, just like database records, virtually any data items, such as "product," "sales rep" and "amount due," can be specified.
By providing a common method for identifying data, XML supports business-to-business transactions and has become "the" format for electronic data interchange and Web services.
XML Is Only a Format
When introduced, XML was hyped as the panacea for e-commerce, but it was only a first step. The human-readable XML tags provide a simple format, but the intelligent defining of these tags to serve business needs properly and everyone's compliance in using the same tags determine XML's real value. Countless vocabularies have been developed for vertical applications; so many in fact, that a universal language was developed to provide a standard for interoperability between them (see UBL
). See XML vocabulary
, Web services
XML Documents Can Define Themselves
An XML document can include a self-describing set of rules that identify the tags and their relationships; for example, only one XYZ tag is allowed within an ABC tag, or there must be one XYZ tag within every ABC tag and so forth. See XML schema
More Rigid than HTML
Unlike HTML, which uses a rather loose coding style and is more tolerant of coding errors, XML pages have to be "well formed" and comply with the rules. See XSLT
XML vs. HTML Tags
Although similar, XML tags define data, whereas HTML tags define the page layout (in this example, font size and a bold date). All elements are wrapped within "start" and "end" tags, also called "open" and "close" tags. The tags themselves begin with a less-than (<) character and end with a greater-than (>) character. All end tags begin with less-than-slash (</).