There are two ways to store non-XML data in BaseX:
* '''Store as raw''':<br/> If <code>application/octet-stream </code> is chosen as content-type , the input data is added as raw.
* '''Convert to XML''':<br/> Raw data can be explicitly converted to XML by specifying the content-type.
Trying to add If raw data without specifying the is added and if no content type , or specifying a wrong content type will eventually lead to , is specified, a <code>400</code> (BAD REQUEST) exceptionerror will be raised. The following content types are available:
* '''<code>application/octet-stream'''</code>: Stores input data as raw file.* '''<code>application/json'''</code>: Stores JSON as XML.* '''<code>application/jsonml'''</code>: Stores JSONML input as XML.* '''<code>text/plain'''</code>: Stores plain text input as XML.* '''<code>text/comma-separated-values'''</code>: Stores CSV text input as XML. * '''<code>text/html'''</code>: Stores HTML input as XML.
; Examples