Defining the Layout of the File

The first few directives define the layout the physical file itself:

FIELD_DELIMITER

The field delimiter defines the character(s) that separate the fields in the rows of data inside the XCSV file. Common field delimiters are commas and tabs. (referred to as "comma separated values" and "tab separated values")

examples:

FIELD_DELIMITER    COMMA
   FIELD_DELIMITER    ~

The directive FIELD_DELIMITER is parsed for STYLE CONSTANTS as defined in the table above.

FIELD_ENCLOSER

The field encloser defines the character(s) that surround the field values. Common field enclosers are single and double quote marks. Many styles will leave this directive unset. If set, it will be applied to all fields.

examples:

FIELD_ENCLOSER    DOUBLEQUOTE
   FIELD_ENCLOSER    SINGLEQUOTE

The directive FIELD_ENCLOSER is parsed for STYLE CONSTANTS as defined in the table above.

RECORD_DELIMITER

The record delimiter defines that character(s) that separate ROWS of data (FIELDS) in the XCSV file. The most common record delimiters are NEWLINE and CR (carriage return).

examples:

RECORD_DELIMITER    NEWLINE
   RECORD_DELIMITER    |

The directive RECORD_DELIMITER is parsed for STYLE CONSTANTS as defined in the table above.

BADCHARS

Bad characters are things that should *never* be written into the XCSV file as data on output. GPSBabel automatically includes any non-blank FIELD_DELIMITER and FIELD_ENCLOSER and RECORD_DELIMITER characters as BADCHARS by default.

examples:

BADCHARS    COMMA
  BADCHARS    ~|

The directive BADCHARS is parsed for STYLE CONSTANTS as defined in the table above.

PROLOGUE

A prologue is basically constant data that is written to the output file BEFORE any waypoints are processed. PROLOGUE can be defined multiple times in the style file, once for each "line" before the data begins. This is commonly used in XCSV files as a "header" row.

examples:

PROLOGUE OziExplorer Waypoint File Version 1.1
  PROLOGUE  WGS 84
  PROLOGUE  Symbol,Name,Latitude,Longitude

EPILOGUE

An Epilogue is the same as a prologue, except this data is written at the END of the file. See the examples for PROLOGUE above.