What is MIME type "text/iso19139+xml"?
A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.
text/iso19139+xml is an XML media type that encodes metadata following the ISO 19139 standard.It formats geospatial metadata in a text-based, human-readable structure using XML rules.
This MIME type mainly serves to describe geographic data details such as spatial references, data quality, and distribution information.
Files using this type typically use the ISO19139 extension, which helps systems identify and process the metadata correctly.
- Exchange geospatial metadata between systems like GIS applications
- Ensure a standardized method for describing spatial data
- Facilitate data validation and integration in mapping and remote sensing platforms
- Promote interoperable communication of geographic information
Associated file extensions
Usage Examples
HTTP Header
When serving content with this MIME type, set the Content-Type header:
Content-Type: text/iso19139+xml
HTML
In HTML, you can specify the MIME type in various elements:
<a href="file.dat" type="text/iso19139+xml">Download file</a>
Server-side (Node.js)
Setting the Content-Type header in Node.js:
const http = require('http');
http.createServer((req, res) => {
res.setHeader('Content-Type', 'text/iso19139+xml');
res.end('Content here');
}).listen(3000);
Associated file extensions
FAQs
What is the purpose of the text/iso19139+xml MIME type?
text/iso19139+xml is used to identify XML files that contain geospatial metadata conforming to the ISO 19139 standard. This specific type allows Geographic Information Systems (GIS) and web services to automatically recognize and validate the structure of metadata describing spatial datasets.
How do I configure Apache to serve .iso19139 files correctly?
You can configure your Apache server by adding the AddType directive to your .htaccess file or main configuration. Use the line: AddType text/iso19139+xml .iso19139 to ensure browsers and clients handle the file as specific geospatial metadata.
How do I add support for this MIME type in Nginx?
In Nginx, open your mime.types file or the http block of your configuration. Add the following line to map the extension: text/iso19139+xml iso19139;, then reload the Nginx service.
Can I open an .iso19139 file in a text editor?
Yes, because files associated with text/iso19139+xml are text-based XML documents. You can view and edit the raw metadata using standard editors like Notepad, Sublime Text, or VS Code, though specialized GIS software is recommended for validating the content.
Why does my browser download the file instead of displaying it?
Browsers often default to downloading unknown file types if the server does not explicitly tell them how to render the content. If the server sends text/iso19139+xml, the browser might not recognize it as renderable text; setting the type to text/xml or installing an XML viewer extension can often force it to display inline.
What is the difference between text/iso19139+xml and application/xml?
While application/xml is a generic MIME type for any XML document, text/iso19139+xml specifically indicates that the content adheres to the ISO 19139 geospatial schema. Using the specific type helps metadata catalogs and GIS software process the information more accurately than a generic label.
Are there security risks associated with this MIME type?
As with any XML-based format, files served as text/iso19139+xml can be vulnerable to XML External Entity (XXE) attacks if processed by a poorly configured parser. Developers should ensure that XML parsers interacting with these files disable external entity resolution to prevent data exposure.
General FAQ
What is a MIME type?
A MIME (Multipurpose Internet Mail Extensions) type is a standard that indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.
MIME types are important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.
MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.
How do I find the MIME type for a file?
You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.
Why are multiple MIME types listed for one extension?
Different applications and historical conventions may use alternative MIME identifiers for the same kind of file. Showing them all helps ensure compatibility across systems.