XML

toc Extensible Markup Language (XML) is a format for the electronic publication of text. XML was designed by an XML Working Group formed by the World Wide Web Consortium (W3C). XML was derived largely from SGML (ISO 8879). The outline for the [|XML 1.0 specification] was finalized February 10, 1998. It has an important role in sharing and exchanging data on the web and across different systems.

=Primary Goals=

Some [|primary goals] of XML, according to the W3C, are:
 * XML must be usable over the Internet
 * XML must be compatible with SGML
 * XML documents must be clear, easy to create, and easily readable by either humans or machines

XML is comprised of tags (which can be named anything) to provide a text-based means to describe and apply a tree-based (or nested) structure to represent information. Each tag must have a matching starting and ending tag to signify a pair.

For example, the following is a valid XML document:

code format="xml" 

<!DOCTYPE message [ <!ELEMENT message (to, from, subject, body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT subject (#PCDATA)> <!ELEMENT body (#PCDATA)> ]>

Alice Bob Our plans for the weekend Don't forget to make reservations for our plans this Saturday! code

=Factors leading to the creation of XML=

XML was designed to be the new "standard" to bridge the gap between older HTML (Hyper Text Mark-Up Language) and newer XHTML (eXtensible Hyper Text Mark-up Language). XHTML is considered to be the "next generation" of HTML and is a hybrid between HTML and XML. Extensible Mark-Up Language allows designers to create their own customized tags. This makes it easier to standardize the definition, transmission, validation, and interpretation of data between applications and between organizations.
 * ===The problems with HTML===
 * Primarily presentation
 * Hard to derive meaning from the markup
 * Fixed tag set
 * Static
 * ===Advantages of using XML===

Important to note
That XML does NOT DO anything because it wasn't designed this way. XML was created to structure, store and to send information. **[|W3school]**

The following example is a note to Jim from Alice, stored as XML:

code format="xml" Jim Alice Don't Forget pick up the kids after work. i have an appointment today code

This note has a header and a body which contained the message. It also carries a sender and receiver information. At the same time, this XML document does not do anything. Their all information stored in an XML format. In order for these commands to work, there must be a piece of software to send, receive or display.

=XML vs. HTML=

XML mark up language is also like HTML (hyper text mark up language). Below shows the main differences between the two from [|W3school]

XML is not a replacement for HTML. XML and HTML were designed with different goals: XML was designed to describe data and to focus on what data is. HTML was designed to display data and to focus on how data looks. HTML is about displaying information, while XML is about describing information.


 * It is important to understand that XML is not a replacement for HTML. In future Web development it is most likely that XML will be used to describe the data, while HTML will be used to format and display the same data.