Class MimeTypesReader

java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.tika.mime.MimeTypesReader
All Implemented Interfaces:
MimeTypesReaderMetKeys, ContentHandler, DTDHandler, EntityResolver, ErrorHandler

@Deprecated(since="2026-04-30") public class MimeTypesReader extends DefaultHandler implements MimeTypesReaderMetKeys
Deprecated.
This version of the Apache Tika library is deprecated. Use your own version of Apache Tika.
A reader for XML files compliant with the freedesktop MIME-info DTD.
   <!DOCTYPE mime-info [
     <!ELEMENT mime-info (mime-type)+>
     <!ATTLIST mime-info xmlns CDATA #FIXED "http://www.freedesktop.org/standards/shared-mime-info">

     <!ELEMENT mime-type (comment|acronym|expanded-acronym|glob|magic|root-XML|alias|sub-class-of)*>
     <!ATTLIST mime-type type CDATA #REQUIRED>

     <!-- a comment describing a document with the respective MIME type. Example: "WMV video" -->
     <!ELEMENT _comment (#PCDATA)>
     <!ATTLIST _comment xml:lang CDATA #IMPLIED>

     <!-- a comment describing a the respective unexpanded MIME type acronym. Example: "WMV" -->
     <!ELEMENT acronym (#PCDATA)>
     <!ATTLIST acronym xml:lang CDATA #IMPLIED>

     <!-- a comment describing a the respective unexpanded MIME type acronym. Example: "Windows Media Video" -->
     <!ELEMENT expanded-acronym (#PCDATA)>
     <!ATTLIST expanded-acronym xml:lang CDATA #IMPLIED>

     <!ELEMENT glob EMPTY>
     <!ATTLIST glob pattern CDATA #REQUIRED>
     <!ATTLIST glob isregex CDATA #IMPLIED>

     <!ELEMENT magic (match)+>
     <!ATTLIST magic priority CDATA #IMPLIED>

     <!ELEMENT match (match)*>
     <!ATTLIST match offset CDATA #REQUIRED>
     <!ATTLIST match type (string|big16|big32|little16|little32|host16|host32|byte) #REQUIRED>
     <!ATTLIST match value CDATA #REQUIRED>
     <!ATTLIST match mask CDATA #IMPLIED>

     <!ELEMENT root-XML EMPTY>
     <!ATTLIST root-XML
           namespaceURI CDATA #REQUIRED
           localName CDATA #REQUIRED>

     <!ELEMENT alias EMPTY>
     <!ATTLIST alias
           type CDATA #REQUIRED>

    <!ELEMENT sub-class-of EMPTY>
    <!ATTLIST sub-class-of
          type CDATA #REQUIRED>
   ]>
  
In addition to the standard fields, this will also read two Tika specific fields: - link - uti
See Also: