The main difference between XML and HTML



Introduction to XML

• The main purpose of XML is to facilitate the exchange of data between two systems.

• XML stands for EXtensible Markup Language.

• XML was designed to describe data, whereas HTML was designed to display text and information.

• XML uses plain text files to describe data.

• Unlike HTML, XML tags are not predefined. You define your own tags

• XML uses a Document Type Definition (DTD) or an XML Schema to describe the valid data.

• XML is a governed by W3C.

• A new version of HTML that is based on XML is called XHTML.

• With XML, data can be exchanged between incompatible systems.

Here is a simple example of an XML document describing the properties of a book:

| |

|Component Based Software Design |

|William Johnson |

|Addison Wesley |

| |

|Covers fundamentals of CORBA, COM, RMI, Remoting, Web Services |

| |

| |

XML allows the person creating the XML document to define their own tags and their own document structure. In the above example, all the tags like , etc.. were created by the person describing the above book data, and are not part of the XML standard. Compare this to tags used to mark up HTML where only the tags that are defined in the HTML standard can be used (e.g., , , , etc..).

It is important to note that XML was designed to describe, and exchange data. It was not designed to display data. Although there is a part of XML (XSLT) that can transform XML to XHTML.

Data Exchange via XML: One of the challenges for enterprises has been to exchange data between incompatible systems over the Internet. Converting the data to XML can greatly facilitate the exchange of data between different systems. Since XML data is stored in plain text format, it makes it easier to create data that different applications and operating systems can easily work with. It also makes it easier to send the XML data over the internet.

XML can also be used to store data in files or in databases. Applications can be written to store and retrieve information from the file or database, and programs can be developed to display the XML data.

Motivation for XML:

Using Notepad, create the following ASP page. Save it as “GetStock.asp” in the c:\webclass folder. Create a virtual directory called with an alias of “wc” and map it to the c:\webclass folder. The appendix A describes how to create a virtual directory. The Appendix A also shows the same example using Java Server Pages

Inet Componenet Test

Data Exchange with

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download

To fulfill the demand for quickly locating and searching documents.

It is intelligent file search solution for home and business.

Literature Lottery

Related searches