Table of Contents

Search

  1. Preface
  2. XML Concepts
  3. Using XML with PowerCenter
  4. Working with XML Sources
  5. Using the XML Editor
  6. Working with XML Targets
  7. XML Source Qualifier Transformation
  8. Midstream XML Transformations
  9. Appendix A: XML Datatype Reference
  10. Appendix B: XPath Query Functions Reference

XML Guide

XML Guide

Steps for Creating an XPath Query Predicate

Steps for Creating an XPath Query Predicate

You can create an XPath query predicate for a view in an XML source definition.
To create an XPath query predicate:
  1. Open an XML source definition in the XML Editor.
  2. Select a view in the XML Editor workspace.
    The view columns appear in the Columns window.
  3. Click View Row XPath.
    The Specify Query Predicate for XPath window appears. You can enter an XPath query predicate in the XPath Predicate window, or you can choose elements, operators, and functions from the tabs in the dialog box.
  4. Click the Child Elements and Attributes tab to display the elements and attributes that you can add to an XPath query predicate.
  5. Double-click an element or attribute to add it to the XPath query predicate.
    The component appears in the panel.
  6. Click the Operators tab.
    Use operators to create expressions. You can compare elements to values or other elements, or you can create mathematical expressions.
    The following table describes the operators you can add to an XPath query predicate:
    Operator
    Description
    +
    Add
    -
    Subtract
    *
    Multiply
    div
    Divide
    mod
    Modulus
    and
    Boolean and
    or
    Boolean or
    <
    Less than
    <=
    Less than or equal to
    >
    Greater than
    >=
    Greater than or equal to
    =
    Equal
    !=
    Not equal
  7. Double-click an operator to add the operator to the XPath query predicate.
  8. To add the PowerCenter XPath query predicate functions, click the Functions tab. Functions accept arguments and return values.
  9. Select another element or attribute from the Child Element and Attributes tab, or enter a value in the XPath Predicate window to complete an expression.
  10. Click Validate to validate the XPath query predicate.

0 COMMENTS

We’d like to hear from you!