Table of Contents

Search

Data Transformation Getting Started Guide

Data Transformation Getting Started Guide

Step 3. Configure the Serializer

Step 3. Configure the Serializer

Configure a Data Processor transformation Serializer in the IntelliScript editor. In this example, send hierarchical input to text output.
  1. To open the IntelliScript editor, click the Script object.
    In the following image, the IntelliScript editor displays a Serializer:
  2. To define the input root element, perform the following steps:
    1. To show the properties in the
      MySerializer
      element, in the
      IntelliScript Editor
      view, double-click the double-right arrows >> near the element.
    2. Double‐click the double-arrows under the
      source
      property and select the
      Locator
      property.
    3. To expand the
      Locator
      property, click the plus sign to the left of the property.
    4. Double‐click the
      data_holder
      property to display the
      Choose Node
      picker.
    5. Expand the
      no target namespace
      element and select the
      /Invoice
      output node. Click
      OK.
      In the following image, the
      IntelliScript Editor
      view displays the
      Locator
      property that defines the input root element:
  3. To transform the
    Invoice_No
    element in the input XML data into text output, perform the following steps:
    1. Under the
      Contains
      line, double-click the empty space near the double-right arrows >>, and select
      ContentSerializer
      .
    2. To expand the
      ContentSerializer
      anchor, click the double-right arrows >> near it.
    3. Double‐click the
      data_holder
      property to display the
      Choose Node
      picker.
    4. Expand the
      no target namespace
      element and select the
      /Invoice/*s/Invoice_No
      node. Then, click
      OK.
    In the following image, the IntelliScript editor displays the final
    ContentSerializer
    element:
  4. To follow the
    Invoice_No
    element data with a carriage return and line return in the output text, create a
    newline
    anchor with ASCII characters
    013
    and
    010
    with separators. To configure the anchor, perform the following steps:
    1. At the end of the Serializer, double-click the empty space near the double-right arrows >>, and type
      newline
      .
    2. After the equals sign, select
      StringSerializer
      .
    3. Expand the
      newline
      anchor.
    4. In the
      str
      parameter that you created, double-click the quotation marks and type CTRL-A.
      A small dot appears in the text box that signifies that the separator contains ASCII input.
    5. Type
      013
      .
      The closing string appends a carriage with the ASCII code 013.
    6. Type CTRL-A.
      A small dot appears next to 013 to signify that the separator contains further ASCII input.
    7. Type
      010
      .
      The closing string appends a line return with the ASCII code 010. In the following image, the IntelliScript editor displays the configured
      newline
      element:
    8. To add the
      newline
      anchor that you configured, double-click the double-arrows >> after the
      Invoice_No
      element, then type
      newline
      .
      In the following image, the IntelliScript editor displays the
      newline
      element after the
      Invoice_No
      element:
  5. To transform the
    CheckRunDate
    element in the input XML data into text output, perform the following steps:
    1. Select the
      ContentSerializer
      anchor that you created. Right-click and select
      Copy
      .
    2. Click the double-right arrows >> after the Serializer anchor that you created, right-click, and select
      Paste
      .
    3. To expand the
      ContentSerializer
      anchor, click the plus sign near it.
    4. Double‐click the
      data_holder
      property to display the
      Choose Node
      picker.
    5. Expand the
      no target namespace
      element and select the
      /Invoice/*s/CheckRunDate
      node. Then, click
      OK.
  6. To transform the
    VendorNo
    ,
    Sub_Total
    ,
    Tax
    ,
    Current_Total
    ,
    Balance_Due
    , and
    Total_Checks
    elements in the input XML data into text output, repeat the previous step, and choose the relevant node each time in the
    Choose Node
    picker.
  7. To transform the
    Order
    element and its sub-elements, create a Repeating Group to perform repeated actions for these elements. To create the Repeating Group, Click the empty space near the double-right arrows >> after the Serializer anchors that you created and select
    RepeatingGroupSerializer
  8. To create a Serializer anchor in the Repeating Group, double-click the nested double-right arrows under the Repeating Group and select
    ContentSerializer
    .
  9. To transform each of the
    CheckNo
    elements in the input XML data into text output, perform the following steps:
    1. To expand the
      ContentSerializer
      anchor, click the double-right arrows >> near it.
    2. Double‐click the
      data_holder
      property to display the
      Choose Node
      picker.
    3. Expand the
      no target namespace
      element and select the
      /Invoice/*s/Order/*s/CheckNo
      node. Then, click
      OK.
    4. To separate the output text with a comma, double-click the
      closing_str
      element and type a comma
      ,
      In the following image, the IntelliScript editor displays the Repeating Group element with the
      ContentSerializer
      element:
  10. To transform the repeating elements
    Check_Value
    and
    Vendor_Name
    , in the input XML data into text output, repeat the previous step, and choose the relevant node each time in the
    Choose Node
    picker.
  11. To transform the repeating element
    Check_Date
    element in the input XML data into text output, repeat the previous step but do not add a comma for the
    closing_str
    parameter.
    In the following image, the IntelliScript editor displays the final Repeating Group element with the
    ContentSerializer
    elements:
  12. To follow the
    Check_Date
    element data with a carriage return and line return in the output text, add the
    newline
    anchor after the
    Check_Date
    element. To add the
    newline
    anchor that you configured, double-click the double-arrows >> after the
    Check_Date
    element, then type
    newline
    .
  13. To save the transformation, in the Developer tool click
    File
    Save
    .