Changes

Jump to navigation Jump to search
112 bytes removed ,  14:40, 18 November 2015
no edit summary
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[[Binary Data]].
* '''Convert to XML''':<br/> Incoming data is converted to XML if a parser is available for the specified content-type. The following content types are supported:
** <code>application/json</code>: Stores JSON as XML.
# If the serialization parameter <code>[[Serialization|media-type]]</code> is supplied, it will be adopted as content-type.
# Otherwise, if the serialization parameter <code>[[Serialization|method]]</code> is supplied, the content-type will be chosen according to the following mapping:
#* <code>xml</code>, <code>adaptive</code>, <code>basex</code> → <code>application/xml</code>
#* <code>xhtml</code> → <code>text/html</code>
#* <code>html</code> → <code>text/html</code>
#* <code>text</code> → <code>text/plain</code>
#* <code>json</code> → <code>application/json</code>
#* <code>raw</code> → <code>application/octet-stream</code> (binary data will be sent in its original byte representation, i. e., without further conversion)
# If no media-type or serialization method is supplied, the content type of a response depends on the chosen REST operation:
#* '''Query'''/'''Run''' → <code>application/xml</code>
Bureaucrats, editor, reviewer, Administrators
12,258

edits

Navigation menu