Extensible Markup Language

From Citizendium
Revision as of 10:12, 29 April 2007 by imported>Paul Derry
Jump to navigation Jump to search

eXtensible Markup Language (XML) is a W3C markup language derived from SGML (ISO8879) used in a wide variety of applications for the storage and representation of textual data.

Usage Examples

Data Storage

Address Book Example

Suppose Thomas wants to write a simple address book program that stores his addresses and phone numbers in a simple structured manner. He decides his best option is to use XML to store his information because he can define what information he wishes to store. XML works best when the information has a hierarchical arrangement, so Thomas designs the schema of how his information will be held.

  • Person or Company Name
    • Addresses
      • Mailing Address
      • E-mail Address
    • Phone Numbers
      • Fax Number
      • Cell/Mobile Number
    • Note

This arrangement of data is then transformed into XML, one possible arrangement is below:

<?xml version="1.0">
<person name="Thomas Paine">
    <addresses>
        <mailing>812 Juniper Road</mailing>
        <email>tpaine@foo.net</email>
    <telephone>
        <primary>987-654-4321</primary>
        <fax>555-555-5555</fax>
        <cell>123-456-7890</cell>
    <note>Me.</note>
</person>

SOAP

Data Formatting

XHTML

MathML

SVG

Data Description

RDF

Schema

References

See Also