Encode Sample with Wild Card

Encode can search for cities, airports, and metropolitan areas using a wild card, which is a percent sign (%). If no percent sign is used at the beginning of the text string, the search looks for words beginning with the string entered.

To use a wild card in a search, enter the percent sign at the beginning of the text string.

Wildcard Examples

Note: Category names (such as MetropolitanArea) and attributes (such as Match) are case sensitive.

Request

For an unnannotated version of the request, see Unnannotated Encode with Wild Card Sample.

Explanation

Code

Begins the Travel Codes Translator eBL request.

Also specifies the desired language for the response.

<Encode xmlns="http://webservices.galileo.com/TravelCodesTranslator/">

<EncodeInput>

  <Encode language="en_US" xmlns="http://webservice.galileo.com">

Requests information for all cities containing the string lant.

A wildcard search can also be used with <Airport Match> and <MetropolitanArea Match>.

    <City Match="%lant"/>

Ends the Travel Codes Translator eBL request.

  </Encode>

</EncodeInput>

</Encode>

Response

Explanation

Code

Begins the Travel Codes Translator eBL response.

<EncodeResponse xmlns="http://webservices.galileo.com/TravelCodesTranslator/">

  <EncodeResult>

    <EncodeResponse Version="1.0.200303281403" xmlns="http://ns.galileo.com">

Four cities are found that contain the string lant.

      <City Code="AIY" CountryCode="US" Match="%lant" StateProvinceCode="NJ">Atlantic City</City>

      <City Code="ATL" CountryCode="US" Match="%lant" StateProvinceCode="GA">Atlanta</City>

      <City Code="BLZ" CountryCode="MW" Match="%lant">Blantyre</City>

      <City Code="GBJ" CountryCode="GP" Match="%lant">Marie Galante</City>

Ends the Travel Codes Translator eBL response.

    </EncodeResponse>

  </EncodeResult>

</EncodeResponse>