Loading TOC...

xdmp:uri-content-type

xdmp:uri-content-type(
   $uri as xs:string
) as xs:string

Summary

Returns the content type of the given URI as matched in the mimetypes configuration. xdmp:content-type continues to work too.

Parameters
$uri The document URI.

Example

  xdmp:uri-content-type("example.txt")
  => text/plain

Example

  xdmp:uri-content-type("example.xml")
  => application/xml

Example

  xdmp:uri-content-type("example.doc")
  => application/msword

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.
  • This page mentions `xdmp:content-type`, but I can't find anything mentioning it, except this very page. Typo? Obsolete note?