Table of Contents


  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

XPath Expressions

XPath Expressions

XPath expressions identify specific elements or nodes in hierarchical documents or check for conditions in the data. Use XPath expressions to define the Input, Condition, or Output fields of a mapping statement.
XPath is a syntax that defines parts of an hierarchical document. Use XPath to select sequences of nodes or values in an hierarchical document. XPath includes a library of standard functions that you can use to select data.
You can define XPath 2.0 expressions in the Data Processor transformation. When you configure Output XPath expressions, you can use a subset of the XPath 2.0 syntax when you define mapping statements for Add mode or Match or Add mode.
For more information about XPath, refer to your XPath documentation.
The following table describes some XPath expressions:
XPath Expression
Selects all child nodes of the given name in the context.
. (dot)
Selects current node.
Selects parent of current node.
Selects attribute.
Selects from root node or child of current node if preceded by node. When the path starts with a slash ( / ) it represents an absolute path to an element.
Selects nodes anywhere in the document or descendants of current node if preceded by node.
The following table lists some XPath expressions and the result of each expression:
XPath Expression
Selects the root bookstore node.
Selects book nodes that are children of all bookstore nodes.
Selects the book nodes in the document in all locations.
Selects all book nodes that are descendants of the bookstore nodes.
Selects all child nodes of bookstore root element.
Returns a sequence of all elements in the document.

Updated March 18, 2021