Changes

Jump to navigation Jump to search
116 bytes added ,  17:43, 12 June 2016
===Input options===
Conversion options for [[Options#JSONPARSER|JSON]], [[Options#CSVPARSER|CSV ]] and [[Options#HTMLPARSER|HTML ]] can also be specified via annotations using with the <code>input</code> prefix. The following function interprets the input as text with the CP1252 encoding and treats the first line of the textual input as CSV header:
<pre class="brush:xquery">
%rest:path("/store.csv")
%rest:POST("{$csv}")
%input:csv("header=true,encoding=CP1252")
function page:store-csv($csv as document-node())
{
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu