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

Querying the Value of an Element of Attribute

Querying the Value of an Element of Attribute

You can create an XPath query predicate to filter element or attribute values in a view. For example, to extract employees in department 100, create the following XPath query predicate:
EMPLOYEE [./DEPT = '100']
The query expression is in brackets. The XPath of Dept is abbreviated by “./” to indicate that the path is continuing from Employee.
The following XPath query predicate extracts employees if the last name is Smith:
EMPLOYEE[./NAME/LASTNAME='SMITH']
Name is a child element of Employee and is the parent of Lastname.
Use Boolean or numeric operators in an XPath query predicate. You can also use string, numeric, and boolean functions in a query.

0 COMMENTS

We’d like to hear from you!