What is MIME type "text/x-eaf+xml"?

A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.

The MIME type text/x-eaf+xml is a specialized XML format. It holds structured annotation data from ELAN, a tool used for multimedia annotations.
It defines how text-based annotation details are stored and exchanged.

This format is used mainly to manage time-aligned annotations for audio and video files. It organizes data with clear XML rules.

Files using this MIME type carry the EAF extension. For more details on ELAN, visit the official ELAN page.

Associated file extensions

Usage Examples

HTTP Header

When serving content with this MIME type, set the Content-Type header:


    Content-Type: text/x-eaf+xml    
  

HTML

In HTML, you can specify the MIME type in various elements:


    <a href="file.dat" type="text/x-eaf+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/x-eaf+xml');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

What is the primary use of the text/x-eaf+xml MIME type?

This MIME type is used primarily by ELAN (EUDICO Linguistic Annotator) to save linguistic annotations for audio and video files. It indicates that the file contains structured data formatted in XML specifically designed for time-aligned multimedia analysis.

How do I open a file with the .eaf extension?

You should use the ELAN software to view and edit the time-aligned annotations and media. Since the underlying format is text-based XML, you can also open eaf files with any standard code editor (like Notepad++ or VS Code) to view the raw data structure.

How do I configure Apache to serve .eaf files?

To ensure your Apache server sends the correct headers, add the following line to your .htaccess file or main configuration: AddType text/x-eaf+xml .eaf. This ensures browsers and client applications recognize the file type correctly.

How do I configure Nginx to recognize text/x-eaf+xml?

In your Nginx mime.types file or within a types block in your server configuration, add the entry: text/x-eaf+xml eaf;. Reload Nginx to apply the changes.

Why does my web browser display code when I open an EAF file?

Because text/x-eaf+xml is an XML-based format, web browsers will display the raw XML tree structure rather than the graphical annotation interface. To see the intended multimedia layout, the file must be opened in ELAN or a specialized web-based viewer that supports this format.

What does the "x-" prefix mean in this MIME type?

The x- prefix stands for "experimental" or "extension," indicating that this is a non-standard MIME type not originally registered with IANA. While modern standards often drop this prefix, text/x-eaf+xml remains the convention for ELAN annotation files.

Is text/x-eaf+xml compatible with application/xml?

Yes, text/x-eaf+xml is a specific subset of XML. While generic XML parsers can read the syntax of the file, they will not understand the specific schema or rules required to interpret the linguistic time slots and tiers without the specific ELAN definitions.

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.