Table of Contents

Search

  1. Preface
  2. Introduction to Data Transformation
  3. Data Processor Transformation
  4. Wizard Input and Output Formats
  5. Relational Input and Output
  6. XMap
  7. Libraries
  8. Schema Object
  9. Command Line Interface
  10. Scripts
  11. Parsers
  12. Script Ports
  13. Document Processors
  14. Formats
  15. Data Holders
  16. Anchors
  17. Transformers
  18. Actions
  19. Serializers
  20. Mappers
  21. Locators, Keys, and Indexing
  22. Streamers
  23. Validators, Notifications, and Failure Handling
  24. Validation Rules
  25. Custom Script Components

Data Transformation User Guide

Data Transformation User Guide

Example of Serialization Anchors

Example of Serialization Anchors

The following example illustrates three serialization anchors:
global level Parser1_Serializer = Serializer >> level 1 contains line level 1 StringSerializer >> level 2 str = "FirstName:«" level 1 ContentSerializer >> level 2 opening_string = "" level 2 closing_string = "" level 2 data_holder = /Person/*s/Name/*s/First level 1 StringSerializer >> level 2 str = "dot013dot010LastName:«"
The first
StringSerializer
instructs the Serializer to write the following text in the output document:
First Name:<tab>
The
ContentSerializer
writes the value of the
Person/Name/First
element to the output.
The second
StringSerializer
writes the string:
<newline>Last Name:<tab>
The IntelliScript editor represents the newline and tab with ASCII codes and
«
, respectively.
Now, assume that you run the Serializer on the following XML:
<Person gender="M"> <Name> <First>Ron</First> <Last>Lehrer</Last> </Name> <Id>547329876</Id> <Age>27</Age> </Person>
From the illustrated serialization anchors, the output is:
First Name<tab>Ron<newline>Last Name<tab>
The display of this text is:
First Name: Ron Last Name:
The Serializer contains additional serialization anchors, which are not shown in the above illustration. The complete output of the Serializer is:
First Name: Ron Last Name: Lehrer Id: 547329876 Age: 27 Gender: M


Updated September 26, 2018