text/*
text/xml
File extensions: .xml
Legacy text/xml variant — differs from application/xml on defaults.
What is text/xml?
text/xml is a legacy media type for XML documents. It exists mainly for historical compatibility; application/xml is preferred by modern services because it defaults to UTF-8 encoding while text/xml historically defaulted to US-ASCII.
Typical usage
Older SOAP endpoints, legacy XML APIs.
Common gotchas
Because of the charset default difference, always specify charset=utf-8 explicitly when using text/xml, or migrate to application/xml.
HTTP header example
Response header
Content-Type: text/xml; charset=utf-8Reference
RFC 7303