Configure a Data Processor transformation Serializer in the IntelliScript editor. In this example, send hierarchical input to text output.
To open the IntelliScript editor, click the Script object.
In the following image, the IntelliScript editor displays a Serializer:
To define the input root element, perform the following steps:
To show the properties in the
MySerializer
element, in the
IntelliScript Editor
view, double-click the double-right arrows >> near the element.
Double‐click the double-arrows under the
source
property and select the
Locator
property.
To expand the
Locator
property, click the plus sign to the left of the property.
Double‐click the
data_holder
property to display the
Choose Node
picker.
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:
To transform the
Invoice_No
element in the input XML data into text output, perform the following steps:
Under the
Contains
line, double-click the empty space near the double-right arrows >>, and select
ContentSerializer
.
To expand the
ContentSerializer
anchor, click the double-right arrows >> near it.
Double‐click the
data_holder
property to display the
Choose Node
picker.
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:
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:
At the end of the Serializer, double-click the empty space near the double-right arrows >>, and type
newline
.
After the equals sign, select
StringSerializer
.
Expand the
newline
anchor.
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.
Type
013
.
The closing string appends a carriage with the ASCII code 013.
Type CTRL-A.
A small dot appears next to 013 to signify that the separator contains further ASCII input.
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:
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:
To transform the
CheckRunDate
element in the input XML data into text output, perform the following steps:
Select the
ContentSerializer
anchor that you created. Right-click and select
Copy
.
Click the double-right arrows >> after the Serializer anchor that you created, right-click, and select
Paste
.
To expand the
ContentSerializer
anchor, click the plus sign near it.
Double‐click the
data_holder
property to display the
Choose Node
picker.
Expand the
no target namespace
element and select the
/Invoice/*s/CheckRunDate
node. Then, click
OK.
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.
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
To create a Serializer anchor in the Repeating Group, double-click the nested double-right arrows under the Repeating Group and select
ContentSerializer
.
To transform each of the
CheckNo
elements in the input XML data into text output, perform the following steps:
To expand the
ContentSerializer
anchor, click the double-right arrows >> near it.
Double‐click the
data_holder
property to display the
Choose Node
picker.
Expand the
no target namespace
element and select the
/Invoice/*s/Order/*s/CheckNo
node. Then, click
OK.
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:
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.
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:
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
.
To save the transformation, in the Developer tool click