Changes

Jump to navigation Jump to search
450 bytes added ,  00:10, 18 October 2013
no edit summary
# If {{Code|format}} is set to {{Code|attributes}}, field names will be stored in name attributes.
If the JSON parser is selected in In the Database Creation dialog of the GUI, a simple example when the CSV parser is displayed selected, the ''Parsing'' tab demonstrates the conversion of CSV to show XML and the effects of the single conversion options. ==Options== The following options are available options: {| class="wikitable sortable" width="100%"|- valign="top"! width="140" | Parameter! width="50%" | Description! Allowed! Default|- valign="top"| {{Code|separator}}| Defines the character which separates the entries of a record in a single line.| {{Code|comma}}, {{Code|semicolon}}, {{Code|colon}}, {{Code|tab}}, {{Code|space}} or a ''single character''| {{Code|comma}}|- valign="top"| {{Code|header}}| Indicates if the first line of the parsed or serialized CSV data is a table header.| {{Code|yes}}, {{Code|no}}| {{Code|no}}|- valign="top"| {{Code|format}}| Specifies the format of the XML data. The format is only relevant if the {{Code|header}} option is activated:<br/>* In the {{Code|direct}} conversion format, field names are represented as element names* In the {{Code|attributes}} conversion, field names are stored in {{Code|name}} attributes| {{Code|direct}}, {{Code|attributes}}| {{Code|direct}}|- valign="top"| {{Code|lax}}| Specifies if a lax approach is used to convert QNames to JSON names.| {{Code|yes}}, {{Code|no}}| {{Code|yes}}|}
=Functions=
|-
| '''Summary'''
|Converts the CSV data specified by {{Code|$input}} to XML, and returns the result as {{Code|<csv/>}} value.<br/>The {{Code|$options}} argument can be used to control the way the input is converted. The following options are available:* {{Code|separator}} defines the character which separates columns in a row. Allowed values are {{Code|comma}}, {{Code|semicolon}}, {{Code|colon}}, {{Code|tab}}, {{Code|space}} and single characters. The default is {{Code|comma}}.* {{Code|header}} specifies if the first line of the input is parsed as table header. Allowed values are {{Code|yes}} and {{Code|no}}; the default is {{Code|no}}.Options can either be specified<br />
* as children of an {{Code|<csv:options/>}} element; e.g.:
<pre class="brush:xml">
|-
| '''Summary'''
|Serializes the node specified by {{Code|$input}} as CSV data, and returns the result as {{Code|xs:string}}.<br />XML documents can also be serialized as CSV if the [[Serialization|Serialization Option]] {{Code|method}} is set to {{Code|csv}}.<br/>The With the {{Code|$options}} argument can be used to control , the way the node is serialized. The following options are available:* {{Code|separator}} defines the character which separates columns in a row. By default, this is a comma ({{Code|,}}).* {{Code|header}} specifies if the input element names are to can be interpreted as header names. The default value is {{Code|false}}controlled.Options can either be specified<br />
* as children of an {{Code|<csv:options/>}} element; e.g.:
<pre class="brush:xml">
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu