XML Overview Designed By: Information exchange The idea of a universal data format is not new. In fact, for as long as computers have been around,programmers have been trying to find ways to exchange information between different computer programs. An early attempt to combine a universally interchangeable data format with rich information storage capabilities was SGML When and Where did it happen? 1986. International Standards Organization. SGML is born. SGML or the Standard Generalized Markup Language made it possible to present the same electronic text the same useful way irrespective of producer or consumer. In more technical words, SGML is a global standard for the definition of device- and systemindependent methods of representing electronic text. And then the web revolution happened. SGML SGML has since proved useful in many large publishing applications where it is used to define the structure of electronic documents. HTML was defined using SGML when the need for a simple markup language arose on the Web. Problems with SGML The problem with SGML is that it is too general and full of features designed to minimize keystrokes in an era when every byte had to be accounted for. It is more complex than Web browsers and average users can cope with HTMLHTML is an implementation of SGML designed to provide Web authors with a relatively simple and efficient means of publishing documents for Web distribution. HTML -tags In HTML documents, tags define the start and end of documents, headings, paragraphs, lists, hypertext links, etc HTML elements are generally identified in a document as a start tag, which gives the element name and attributes, followed by the content, followed by an end tag. Start tags are delimited by < and >, and end tags are delimited by and >. HTML-highly successful For example ...
This is a Heading
This is a paragraph
START TAG CONTENT END TAG HTML is designed to be flexible in that the closing tags of some elements may be omitted HTML-text-based advantage Not only would that browser be able to display the document, but also if the page contained links (termed hyperlinks) to other documents, the browser would be able to seamlessly retrieve them as well. Furthermore, because HTML is text-based, anyone can create an HTML page using a simple text editor, or any number of web page editors. HTML –not so powerful However HTML tells the computer nothing about the content of a document other than how it should be displayed. Client-display Client-side computers are reduced to platforms for document display, and server-side computers are required to endlessly produce and communicate documents to feed the demand. Wasteful web search It is also wasteful in terms of Web search efficiency. With HTML a search engine cannot distinguish between references to a book by Benjamin Franklin and a book about Benjamin Franklin, which is why the results of a Web search are invariably cluttered with many useless and inappropriate links. Solution? Separation of Content from Style The solution is simple: use tags that say what the information is, not how it looks, and separate the content of a document from its presentation (or style). XML XML does exactly this it allows use of tags that are descriptive of the contents of a document DOCUMENT and it separates the description of structure and content from information concerning presentation. STYLESHEET Documents-Common presentations This makes it much easier to have, and to change, a common presentation across a set of documents, or to have different presentations of the same information for different audiences. 1:M ONE STYLESHEET XML DOCUMENT XML DOCUMENT XML DOCUMENT XML- not a language It is important to realize, however, that XML is not really a "language" at all, but a standard for creating languages that meet the XML criteria In other words, XML describes a syntax that you use to create your own languages. A simple example For example, I have data about a name, and I want to be able to share that information with others and I also want to be able to use that information in a computer program. Instead of just creating a text file like: BILL GATES Name in HTML-NO or an HTML file like this: Name
Bill Gates
Name in XML-YES I might create an XML file like this: BillGates