Antes de enviar tus feeds a Google, puedes validarlos con esquemas publicados.
En la siguiente tabla se indican los esquemas disponibles con los que puedes validar tus feeds:
Esquema (descarga) | Modos de envío de precios que se aplican | Esquema (ubicación) |
---|---|---|
Hotel List | All | www.gstatic.com/localfeed/local_feed.xsd |
Landing pages | All | www.gstatic.com/ads-travel/hotels/api/point_of_sale.xsd |
Transaction (Property Data) | ARI | www.gstatic.com/ads-travel/hotels/api/transaction_property_data.xsd |
Transaction (Property Data) Response | ARI | www.gstatic.com/ads-travel/hotels/api/transaction_property_data_response.xsd |
OTA_HotelRateAmountNotifRQ | ARI | www.gstatic.com/ads-travel/hotels/api/ota_hotel_rate_amount_notif_rq.xsd |
OTA_HotelRateAmountNotifRS | ARI | www.gstatic.com/ads-travel/hotels/api/ota_hotel_rate_amount_notif_rs.xsd |
OTA_HotelAvailNotifRQ | ARI | www.gstatic.com/ads-travel/hotels/api/ota_hotel_avail_notif_rq.xsd |
OTA_HotelAvailNotifRS | ARI | www.gstatic.com/ads-travel/hotels/api/ota_hotel_avail_notif_rs.xsd |
OTA_HotelInvCountNotifRQ | ARI | www.gstatic.com/ads-travel/hotels/api/ota_hotel_inv_count_notif_rq.xsd |
OTA_HotelInvCountNotifRS | ARI | www.gstatic.com/ads-travel/hotels/api/ota_hotel_inv_count_notif_rs.xsd |
TaxFeeInfo | ARI | www.gstatic.com/ads-travel/hotels/api/tax_fee_info.xsd |
TaxFeeInfoResponse | ARI | www.gstatic.com/ads-travel/hotels/api/tax_fee_info_response.xsd |
Promotions | ARI | www.gstatic.com/ads-travel/hotels/api/promotions.xsd |
PromotionsResponse | ARI | www.gstatic.com/ads-travel/hotels/api/promotions_response.xsd |
Transaction | Pull, Changed Pricing | www.gstatic.com/ads-travel/hotels/api/transaction.xsd |
Rate rules | Pull, Changed Pricing | www.gstatic.com/ads-travel/hotels/api/private_rates.xsd |
Hint Response | Changed Pricing | www.gstatic.com/ads-travel/hotels/api/hint.xsd |
Query (de Google a partners) | Pull, Changed Pricing, Live Pricing Query | www.gstatic.com/ads-travel/hotels/api/query.xsd |
Para validar tus archivos con estos esquemas, puedes utilizar una herramienta de XML de terceros, como xmllint
.
La sintaxis para usar xmllint
con el fin de validar un esquema es la siguiente:
Usa http:
para la URL de schema_location, ya que xmllint
no admite https:
.
$ xmllint --schema schema_location file_to_validate
En el siguiente ejemplo, se valida el archivo mypriceupdates.xml con el esquema de mensajes Transaction:
$ xmllint --schema http://www.gstatic.com/ads-travel/hotels/api/transaction.xsd mypriceupdates.xml
En este ejemplo se valida el archivo myfeed.xml con el esquema de feeds de lista de hoteles y solo se muestran errores si hay:
$ xmllint --noout --schema http://www.gstatic.com/localfeed/local_feed.xsd myfeed.xml