XML and MIME
From Wikipedia, the free encyclopedia
Contents |
[edit] XML
An XML document is a text document that consists of an XML declaration and a root element with well-formed content.
Example XML Document
<?xml version="1.0"?> <root> Blah </root>
[edit] MIME
MIME is an Internet Standard that allows email systems to interpret complex data. Web browsers also use the MIME type to accurately display information or launch a separate application to handle the data.
All MIME types (called Internet media type) consist of two parts, in the form type/subtype.
This information is sent to the browser by a web server. Usually, the server determines the MIME type based on the document's file extension. For example, the server would interpret an extension of .txt (plain text file) to have a MIME type of text/plain.
[edit] XML Specific MIME Types
There are two MIME assignments for XML data. These are:
Because of the wide variety of documents that can be expressed using an XML syntax, additional MIME types are needed to differentiate between languages. XML-based formats add a suffix of +xml to the MIME type.
The followings are some examples of common XML media types.
- Registered
- Registration-In-Progress
- Extensible Stylesheet Language Transformations (XSLT): application/xslt+xml
- Scalable Vector Graphics (SVG): image/svg+xml
- Unregistered