TDV Adapter for XML

Build 24.0.9060

api:match

The api:match keyword is similar to the api:equals keyword; however, it permits complex matching rules.

Parameters

  • pattern: The pattern to match.
  • type: The type of matches to find. The default value is "exact", which requires an exact match of the value. In this case api:match is identical to api:equals. Other supported types are "regex", for regular expression matching, and "glob", which supports a simple expression model similar to the one used in file-name patterns, for example, *.txt.

    The .NET edition of the adapter uses the .NET Framework version of regular expression matching. The Java edition uses Java regular expression constructs.

  • value: The value to match.

Control Attributes

None

Examples

Check for floating point numbers using a regex pattern. If the pattern is matched then the item will be pushed out.

<api:match pattern="\[-+\]?\[0-9\]*\.?\[0-9\]*" type="regex" value="-3.14">
  <api:push/>
</api:match>

See Also

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060