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

Testing for Elements or Attributes

Testing for Elements or Attributes

You can determine if an element or attribute occurs in the XML data. The following XPath query predicate determines if a department has a department name attribute:
COMPANY/DEPT[@DEPTNAME]/EMPLOYEE
Deptname is an attribute. Attributes are preceded by “@” in an XML query predicate expression.
When you run a session, the Integration Service extracts employee data from the XML source if the employee’s department has a department name. Otherwise, the Integration Service does not extract the employee data.

0 COMMENTS

We’d like to hear from you!