Designing Custom Encoders

ProcedureTo create a delimiter list

  1. In the XSD Editor, select the node for which you want to define a set of delimiters (this example uses the root node, which is designated Element_1). By default, the value for the Node Type property is set to delimited and the value for the Delimiter List property appears as not specified.


    Note –

    The Node Type values for elements and fields also are delimited by default, so they automatically pick up the delimiters specified for their ancestors unless you define new delimiter lists for them.


  2. Click the ellipsis (…) button in the Delimiter List value field to display the Delimiter List Editor, which is initially blank.

  3. Click Add Level to add a level to the delimiter list, then click Add Delimiter to add a delimiter to the selected level. Click in the Bytes field to activate it for editing and type in the delimiter characters.

  4. Press Enter to set the delimiter value. The list should appear as shown in the following figure.

    Figure 15 Delimiter List Editor - Add Delimiter

    Image of Delimiter List Editor with one Level
and one Delimiter.

  5. Continue adding levels and delimiters as required, as shown in the following figure.

    Figure 16 Delimiter List Editor - Add Levels and Delimiters

    Image of Delimiter List Editor with multiple
Levels and multiple Delimiters.

  6. Click OK to close the editor and save your work.

  7. The value for the Delimiter List property will now indicate the number of delimiter levels that are specified, as shown in the following figure.

    Figure 17 Element_1 - Delimiters Specified

    Image of Element_1 node Properties panel.

  8. The properties for Element_2 are displayed in the following figure. It automatically picks up the delimiters for Level 2, since the existing delimiter list is defined for Element_1. Defining another delimiter list here would override the existing list.

    Figure 18 Element_2 Properties

    Image of Element_2 node Properties panel.

  9. Leave the Node Type property for Field_1 set to delimited; it automatically picks up the delimiters for Level 3 from the list defined for Element_1, as displayed in the following figure. Again, the Delimiter List property remains not specified.

    Figure 19 Field_1 Properties

    Image of Field_1 node Properties panel.

  10. Once you have defined your delimiter list, you should test the Encoder to verify that it parses correctly.