This document standardizes three media types related to XML MIME entities: application/xml, application/xml-external-parsed-entity, and application/xml-dtd while deprecating text/xml and text/xml-external-parsed-entity. Registration information for these media types is described in the sections below.
And similarly vice versa, if you keep XML simple enough it can be valid HTML.
The 'application/xhtml+xml' media type [RFC3236] is the primary media type for XHTML Family documents. 'application/xhtml+xml' should be used for serving XHTML documents to XHTML user agents (agents that explicitly indicate they support this media type).
There are two MIME assignments for XML data. These are: application/xml (RFC 7303, previously RFC 3023) text/xml (RFC 7303, previously RFC 3023)
HTML: text/html
, full-stop.
XHTML: application/xhtml+xml
, or only if following HTML compatbility guidelines, text/html
. See the W3 Media Types Note.
XML: text/xml
, application/xml
(RFC 2376).
There are also many other media types based around XML, for example application/rss+xml
or image/svg+xml
. It's a safe bet that any unrecognised but registered ending in +xml
is XML-based. See the IANA list for registered media types ending in +xml
.
(For unregistered x-
types, all bets are off, but you'd hope +xml
would be respected.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With