Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX -
Contents Index PreviousNext

Part 3 Other Application Developments> Chapter 12 XML Conversion Function

12.8 CSV Formats Supported by the XML Conversion Function

This section describes the CSV formats that are supported by the XML conversion function.

mark1Delimiter Characters

The data between the delimiter characters is handled as 1 data.

Refer to K.2.3 setDelimiter for more information on the characters that can be specified as delimiter characters.

mark1Quotation Marks

If the quotation marks are specified, both CSV data with and without quotation marks can be used.

Refer to K.2.4 setQuote for more information on the characters that can be specified as quotation marks.

mark1Blanks in Both Ends of Data

The blank characters (blank space, tab) in both ends of data will be deleted. It is necessary to enclose the data in quotation marks if the data contain a blank character.

mark1Character Data

The two methods shown below can be used to enter delimiter characters, quotation marks, and the backslash (\) as character data.
Select the method in accordance with the argument value specified in the setEnableEscapeChar() of the CSVSource class.

The example below shows how delimiter characters, quotation marks, and the backslash (\) are entered as data. (This example assumes that the comma (,) was specified as the delimiter character.)

Example

To enter $1,200, He said "Hello.", and \100 as data, enter these in the CSV file as follows:
  1. If the CSVSource class setEnableEscapeChar() argument value is "false":

    "$1,200", "He said ""Hello.""", "\100"

  2. If the CSVSource class setEnableEscapeChar() argument value is "true" (*1)

    "$1,200", "He said \"Hello.\"", "\\100"
*1) Instead of "$1,200", $1\,200 can also be entered.

mark1Linefeed Characters

Linefeed characters (CR, LF, or CRLF) included in data that is enclosed in quotation marks are output to an XML document as is, even if the output destination is an attribute value or an element.
The linefeed characters (CR, LF, or CRLF) in data enclosed in quotation marks are not converted to character references (
 
).
From XML 1.0, if an XML document that includes linefeed characters is given to an XML processor, the linefeed characters are converted as follows:


Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006