=Functions=
==fetch:contenttext==
{| width='100%'
|-
| width='90' | '''Signatures'''
|{{Func|fetch:contenttext|$uri as xs:string|xs:string}}<br/>{{Func|fetch:contenttext|$uri as xs:string, $encoding as xs:string|xs:string}}<br/>
|-
| '''Summary'''
| '''Examples'''
|
* <code><nowiki>fetch:contenttext("http://en.wikipedia.org")</nowiki></code> returns a string representation of the English Wikipedia main HTML page.
|}
==fetch:content-binary==
{| width='100%'
|-
| width='90' | '''Signatures'''
|{{Func|fetch:content-binary|$uri as xs:string|xs:base64Binary}}<br/>
|-
| '''Summary'''
| '''Examples'''
|
* <code><nowiki>fetch:binary("http://images.trulia.com/blogimg/c/5/f/4/679932_1298401950553_o.jpg")</nowiki></code> returns the addressed image.|} ==fetch:content-type=={| width='100%'|-| width='90' | '''Signatures'''|{{Func|fetch:content-binarytype|$uri as xs:string|xs:string}}<br/>|-| '''Summary'''|Returns the content-type (also called mime-type) of the resource specified by {{Code|$uri}}:* If local files are addressed, the file extension will be guessed based on the file extension.* For remote resources, the request header will be evaluated.|-| '''Errors'''|{{Error|BXFE0001|XQuery Errors#Functions Errors}} the URI could not be resolved, or the resource could not be retrieved.|-| '''Examples'''|* <code><nowiki>fetch:content-type("http://images.trulia.com/blogimg/c/5/f/4/679932_1298401950553_o.jpg")</nowiki></code> returns the addressed image.
|}