mime.xml

Functions for reading XML descriptions of MIME types.

Public Imports

mime.type
public import mime.type;

Members

Classes

XMLMimeException
class XMLMimeException

Exception that's thrown on invalid XML definition of MIME type.

Functions

getXMLnamespaceFromData
string getXMLnamespaceFromData(const(char)[] xmlData)

Get XML namespace from text data. The text is not required to be a data of the whole file. Note however that some xml files may contain a big portion of DOCTYPE declaration at the start.

getXMLnamespaceFromFile
string getXMLnamespaceFromFile(string fileName, size_t upTo)

Get XML namespace of file.

matchTypeFromString
MagicMatch.Type matchTypeFromString(const(char)[] str)

Get symbolic constant of match type according to the string.

readMediaSubtypeFile
MimeType readMediaSubtypeFile(string filePath)

Read MIME type from MEDIA/SUBTYPE.xml file (e.g. image/png.xml).

readMediaSubtypeXML
MimeType readMediaSubtypeXML(const(char)[] xmlData)

Read MIME type from xml formatted data with mime-type root element as defined by spec.

readMimePackageFile
XMLPackageRange readMimePackageFile(string filePath)

Lazily read MIME types from packages/package_name.xml file (e.g. packages/freedesktop.org.xml).

readMimePackageXML
XMLPackageRange readMimePackageXML(string xmlData)

Read MIME types from xml formatted data with mime-info root element as defined by spec.

treeMatchTypeFromString
TreeMatch.Type treeMatchTypeFromString(const(char)[] str)

Get symbolic constant of tree match type according to the string.

Structs

XMLPackageRange
struct XMLPackageRange
Undocumented in source.

Meta