Table of Contents

<unitFilter> Element

This element defines a unit filter.

Parent Elements

buyOff, componentType, test

Attributes

None.

Child Elements

Name Description Required
exclude Specifies units to be excluded by the filter. No
include Specifies units to be included by the filter. No

Remarks

The order of the <include> and <exclude> entries do not matter. Excluded units always take precedence: if a unit matches an <exclude> entry, then the unit will not be included by the unit filter, even if it is matched by an <include> entry. As long as a unit does not match any <exclude> entries, if it matches any <include> entry, then it will be included by the unit filter.

If there are no <include> or <exclude> entries, then all units will be matched.

Examples

Match All Units

To match all units, normally the <unitFilter> element should not be used at all. However, the following examples will also cause all units to be matched:

<unitFilter>
</unitFilter>

Or:

<unitFilter>
  <include modelNumber="*" />
</unitFilter>

Match Only Specific Units

The following will match only units with model numbers M1A, M1C, or that start with M2:

<unitFilter>
  <include modelNumber="M1A" />
  <include modelNumber="M1C" />
  <include modelNumber="M2*" />
</unitFilter>

Match All Except Specific Units

The following will match all units except those with model numbers M3A or M3B:

<unitFilter>
  <exclude modelNumber="M3A" />
  <exclude modelNumber="M3B" />
</unitFilter>

Match a Group of Units with Exceptions

The following will match all units with model numbers that start with M4 except for model numbers that start with M4Z:

<unitFilter>
  <include modelNumber="M4*" />
  <exclude modelNumber="M4Z*" />
</unitFilter>