Filters

Filters in XML Select Service allow you to filter the response from the host to display only the information needed. Unless you know exactly what you want to display in the response, use the Empty Filter until you decide what type of information you want.

Construct filters to match the response from XML Select and exclude the information that you do not want to receive. Note: Ensure that you do not filter error information.

 The benefits to filtering your response are as follows:

  1. Filters cut down on the amount of data that is sent back to the client, which should help network throughput and increase processing speed on the client side. (Larger documents take longer to parse and they consume more memory.)

  2. Filters simplify the XML that the client has to handle. Frequently, there is data that the client application doesn't need and doesn't display to the user.

Empty Filter

To display the entire response, use the following:

<_ xmlns=""/>

The empty filter displays all information returned by the CRS.

Using Filters

Filters indicate which parts of the response you want to display.  For a complete request and response using a filter, see Filter Sample.

For example, in a hotel availability response, if you only want to view the property list, use the following filter:

<HotelAvailability_8_0>
 <HotelAvailabilityPropList>
   <_ xmlns=""/>
 </HotelAvailabilityPropList>
</HotelAvailability_8_0>

If you want to only display the chain code, RoomMaster ID, property name, address, and BIC codes, use the following filter:

<HotelAvailability_8_0>
<HotelAvailabilityPropList>
<ChainCodeAry>
 <ChainCode>
    <Chain></Chain>
    <RoomMasterID></RoomMasterID>
    <PropName></PropName>
    <ShortAddr></ShortAddr>
    <BICAry>
       <_ xmlns=""/>
    </BICAry>
 </ChainCode>
</ChainCodeAry>
</HotelAvailabilityPropList>
</HotelAvailability_8_0>