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. Using the IntelliScript Editor
  7. XMap
  8. Libraries
  9. Schema Object
  10. Command Line Interface
  11. Scripts
  12. Parsers
  13. Script Ports
  14. Document Processors
  15. Formats
  16. Data Holders
  17. Anchors
  18. Transformers
  19. Actions
  20. Serializers
  21. Mappers
  22. Locators, Keys, and Indexing
  23. Streamers
  24. Validators, Notifications, and Failure Handling
  25. Validation Rules
  26. Custom Script Components

Output XPath Expressions

Output XPath Expressions

The Data Processor transformation accepts a subset of XPath statements in the Output field when the Mode field set to is
Add
or
Match or Add
. When you select these mode settings, the Data Processor transformation creates elements as needed to match the XPath expression in the Output field.
You can use a simple XPath expression in the Output field. A simple expression has child axes, parent axes, or variables. Simple expressions do not have predicates, functions or complex axes. For example, you can use the following Output field expressions:
person/data
/root/ceo/name
$var/name
person/../ceo
You can use a simple predicate with cardinality for an element with several instances. For example, you can use the following Output field expression:
person/phone[4]
You can use a simple predicate with a formula with an equal sign, with simple XPaths on the left-hand side of the equal sign. For example, you can use the following Output field expressions:
Person[id=10]
Person[id=$id]
Person[id=@dp:input()/ID]
Company[name=upper-case($compName)]
Person[role="manager" and id=1]
You can also use a combination of a simple expression with cardinality and a formula that uses a simple XPath on the left-hand side of the equal sign. For example, you can use the following Output field expressions:
company[4]/details[id=$myid]/phone
When the Mode field is set to
Match
, the Output field can also accept complex XPath expressions.


Updated March 03, 2021