XML (eXtensible Markup Language) can be used to describe data. It focuses on what data is, not how to display it. Unlike HTML, XML tags are not predefined. You must define your own tags. The XML document uses a DTD (Document Type Definition) or XML Schema to describe the data.
There is nothing complicated or special about XML. It is just plain text with the addition of some tags to describe the data. You can open an XML document in simply text editor. However there are XML-aware applications that will handle the XML tags specially. can be handled specially.
When you create and HTML/XHTML document you define a doctype. This defines what DTD to use for your document. For example... http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd (opens in IE)
Mostly to store data. Since it is plain text the data can be used by a variety if systems to read, search and display the information. XML can also be used to create other languages, for example WML.
Sound familiar?