Format Designer - Flat File Schema Definition - delimited data definition

Records and fields can have a separator specifier. This specifier delimits the record or field within the data. Where a delimiter is not specified, the data is treated as fixed width, using the max-length attribute of the field element.

The example below shows fields and records with separators:

<?xml encoding='UTF8' version='1.0' ?>

<schema xmlns='http://www.systemsunion.com/2001/TD/SSTransform/fsd/' version='1.0'>

		<sequence output='no'>

				<record max-occur='0' name='parent' record-sep='\r\n'>

						<field name='child1' field-sep=','/>

								<field name='child2'/>

						</record>

				</sequence>

		</schema>

and will generate the following XML structure:

<parent>

		<child1/> 

		<child2/>

</parent>

Example input for this FSD is:

Child 1 Data,Child 2 Data
Child 3 Data,Child 4 Data

and example output generated:

<parent>

		<child1>Child 1 Data</child1>

		<child2>Child 2 Data</child2>

</parent>

<parent>

		<child1>Child 3 Data</child1>

		<child2>Child 4 Data</child2>

</parent>

The FSD above marks each record as ending with a carriage-return line-feed pair (which is the standard end of line marker on Microsoft Operating Systems). It then defines two fields for each record. The first field uses the a comma as a delimiter; the second field is the last field in the record and therefore it uses the delimiter specified for the record as its own delimiter.