Filter Sample
Filters are used to specify only the information that you want to display in the response. 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.
This sample includes the following:
-
XML hotel availability request.
-
Complete response (no filter).
-
Filtered response for property list.
-
Filtered response for the property's chain code, RoomMaster ID, property name, address, and BIC code.
XML Request
<HotelAvailability_8_0>
</HotelAvailability_8_0>
Empty Filter
When you use an empty filter in the request, all information about the request is returned.
Empty Filter Request
<_ xmlns=""/>
Empty Filter Response
Note:
<HotelAvailability_8_0 xmlns="">
</HotelAvailability_8_0>
Filter Property List
To display only the property list for the request, use the following filter:
<HotelAvailability_8_0>
</HotelAvailability_8_0>
Response with Property List Filter
In the following response, the <HotelAvailability> section is not displayed because it was not included in the filter.
Note:
<HotelAvailability_8_0 xmlns="">
</HotelAvailability_8_0>
Filter Chain Code, RoomMaster ID, Property Name, Address, and BIC Code
If you want to only display the property's chain code, RoomMaster ID, property name, address, and BIC code, 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>
Response
The response displays only the chain code, RoomMaster
ID, property name, address, and BIC code. The following information displayed
in the Property List filter response but does not display in this response:
Note:
<HotelAvailability_8_0 xmlns="">
</HotelAvailability_8_0>