What is MIME type "application/marcxml+xml"?

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

The MIME type application/marcxml+xml is meant for exchanging bibliographic records in an XML format. It takes the traditional MARC structure and uses XML for data encoding. It ensures that library data is transferred in a manner that modern systems can read.

Files using this MIME type often come with the extension MRCX.

For more technical details on MARCXML, visit Library of Congress MARC Resources.

Associated file extensions

Usage Examples

HTTP Header

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


    Content-Type: application/marcxml+xml    
  

HTML

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


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

Associated file extensions

FAQs

What is the primary purpose of application/marcxml+xml?

This MIME type is used to transmit bibliographic data formatted according to the MARCXML schema. It allows Integrated Library Systems (ILS) and data harvesters (like those using OAI-PMH) to exchange catalog records in a standard, parseable XML format rather than the older binary MARC format.

How do I configure Apache to serve .mrcx files correctly?

You can add the MIME type definition to your .htaccess file or main configuration. Add the line: AddType application/marcxml+xml .mrcx. This ensures browsers and API clients identify the file as specific MARC data rather than generic XML.

How do I set up Nginx to handle this MIME type?

In your Nginx mime.types file or within a specific server block, map the extension to the type. Use the directive: types { application/marcxml+xml mrcx; } to ensure correct delivery.

What is the difference between application/marcxml+xml and application/marc?

The type application/marc usually refers to the legacy, binary ISO 2709 format (often .mrc files), which is difficult for standard web tools to read. In contrast, application/marcxml+xml wraps that data in XML, making it human-readable and compatible with modern parsers and web technologies.

Can web browsers display application/marcxml+xml files?

Yes, because the subtype includes +xml, most modern browsers will render the file as a structured XML tree. To display it as a styled web page, the file usually needs an associated XSLT stylesheet.

Which software applications open .mrcx files?

Specialized library software like MarcEdit or Koha is required to interpret the bibliographic fields fully. However, since the underlying format is text-based XML, you can also view the raw data in any text editor like Notepad++ or VS Code.

Are there security risks associated with this MIME type?

As with any XML-based format, applications parsing this type must be secured against XML External Entity (XXE) attacks. Developers should ensure that the XML parser used to read these records disables external entity resolution.

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.