XML filter specification

XML filter specification

XML filter specification complies with XML file structure and must meet the following conditions:

  • it may contain the optional section <FILTER_OPTIONS> that set a filter

  • it must contain <CFGRECORDS> section that set the filter attributes

  • must not contain another reserved section than <CFGRECORDS>

Characteristics of <FILTER_OPTIONS> section

  • value of parameter <Operator> may be AND or OR

  • value AND defines that the object meets the filter only if all the filter conditions are fulfilled

  • value OR defines that the object meets the filter only if at least one filter attribute is fulfilled

  • element <Type> always filters the objects

  • if the optional section is not in filter or it does not contain the parameter <Operator>, the object meets the filter only if all the filter conditions are fulfilled

Characteristics of <CFGRECORDS> section

  • contains the filter attributes, they decide whether the object meets or does not meet the filter conditions

  • the main filter attributes are placed in <TObjItemData> structure

  • element <Type> defines which object will be filtered

  • supplementary filter attributes, stated in the particular structure, depends on the object type that will be filtered

  • supplementary filter attributes from two different types of object must not be combined, otherwise they are automatically considered to be inconvenient

  • structures must not contain the attributes with string values of SDT_EXPRESSION or SDT_RAW_DATA type

Example of XML file representing the XML filter

<?xml version="1.0" encoding="windows-1250"?> <ROOT> <FILTER_OPTIONS> <Operator>AND</Operator> </FILTER_OPTIONS> <CFGRECORDS> <TObjItemData> <Name>A*</Name> <Typ>ARCH_VAL</Typ> <VHL>100</VHL> </TObjItemData> <TArchivData_Full> <TArchivData> <Periode>60</Periode> <Offset>0</Offset> </TArchivData> </TArchivData_Full> </CFGRECORDS> </ROOT>

Object of ARCH_VAL type meets the filter if it meets at least one of the conditions: it satisfies the mask A*, VHL attribute = 100, Periode attribute = 0 or Offset attribute = 0.
If OR is not set or if AND is set, the relation between filter attributes will be changed to AND.