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.