Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Để thiết lập danh sách khách sạn, bạn có thể sử dụng một trong các phương thức sau:
Cung cấp tệp CSV hoặc XML
Tải tệp lên từ Hotel Center
Lưu trữ tệp trên máy chủ
Hướng dẫn này mô tả cách thiết lập danh sách khách sạn bằng tệp XML và lưu trữ nguồn cấp dữ liệu XML trên máy chủ của bạn để Google tải tệp XML xuống theo lịch đã yêu cầu. Để biết các phương pháp thiết lập danh sách khách sạn khác, hãy xem bài viết Cách thiết lập quỹ phòng khách sạn.
Giới thiệu về danh sách khách sạn ở định dạng tệp XML
Tệp danh sách khách sạn chứa dữ liệu dạng mô tả (chẳng hạn như tên cơ sở lưu trú, địa chỉ, vị trí được mã hoá địa lý) được sắp xếp theo cơ sở lưu trú đối với tất cả các cơ sở lưu trú trong một tài khoản Hotel Center.
Dưới đây là ví dụ cơ bản về một tệp danh sách khách sạn ở định dạng tệp XML. Ví dụ này chỉ cho thấy một trong số nhiều phần tử <listing> được chỉ định trong tệp. Mỗi phần tử <listing> đại diện cho một cơ sở lưu trú.
Xác thực tệp bằng giản đồ nguồn cấp dữ liệu danh sách khách sạn.
Sau khi xác thực tệp, hãy lưu trữ nguồn cấp dữ liệu trên máy chủ của bạn. Ngoài ra, bạn có thể tải danh sách lên trong Hotel Center theo cách thủ công.
Lưu trữ nguồn cấp dữ liệu XML trên máy chủ của bạn
Với phương thức phân phối Lấy dữ liệu danh sách khách sạn, bạn có thể lưu trữ danh sách khách sạn trên máy chủ của mình và Google sẽ tìm nạp nguồn cấp dữ liệu theo tần suất mà bạn chọn. Sau khi tạo danh sách khách sạn và xác thực tệp XML của danh sách đó, hãy làm như sau:
Hãy liên hệ với Giám đốc Quản lý Khách hàng về Kỹ thuật (TAM) để thiết lập những mục sau:
Lịch tải xuống cho Google, thường là mỗi tuần một lần
URL tải xuống và các yêu cầu về việc xác thực
Nếu không có lỗi, danh sách khách sạn của bạn sẽ được xuất bản và tất cả các cơ sở lưu trú phù hợp trong Google Maps sẽ hiển thị trên tài khoản Hotel Center của bạn trong thẻ Cơ sở lưu trú.
Nếu có lỗi, Google sẽ chia sẻ lỗi với bạn để bạn có thể sửa lỗi và chuẩn bị tệp để tải xuống lại.
Yêu cầu đối với việc lưu trữ
Hãy tuân thủ các yêu cầu sau đây khi lưu trữ nguồn cấp dữ liệu XML:
Yêu cầu về máy chủ
Bạn phải truy cập được vào máy chủ thông qua HTTP hoặc HTTPS.
Yêu cầu về thư mục
Để đảm bảo Google có thể lấy được thông tin tổng quan nhanh về toàn bộ dữ liệu của bạn chứ không phải tải xuống các tệp chưa hoàn thiện, hãy tuân thủ những hướng dẫn sau khi đăng tệp lên máy chủ HTTP của bạn:
Xây dựng và xác thực các tệp XML của nguồn cấp dữ liệu trong một thư mục khác với thư mục mà Google tìm nạp, tức là: Không sử dụng thư mục download.
Sau khi xác thực thành công tệp XML của nguồn cấp dữ liệu, hãy tạo một đường liên kết tượng trưng từ thư mục tải xuống đến nguồn cấp dữ liệu mới tạo.
Nếu bạn đang cung cấp tệp .zip, hãy đưa các tệp XML vào thư mục gốc và không phải trong thư mục tải xuống.
Yêu cầu về tệp
Sử dụng tệp văn bản thuần tuý chứ không phải tệp có định dạng như tệp Microsoft Word.
Đảm bảo rằng tệp XML chưa nén không vượt quá 100 MB. Bạn có thể nén một hoặc nhiều tệp XML vào một tệp .zip. Không có giới hạn đối với tệp XML đã nén hoặc tệp .zip.
Đặt tên tệp như sau:
Đối với một tệp XML, hãy sử dụng PARTNER_NAME_local.xml.
Đối với một hoặc nhiều tệp XML trong một tệp zip, hãy sử dụng PARTNER_NAME_local.xml.zip
Bạn có thể tuỳ ý đặt tên cho từng tệp XML trong tệp zip, tuy nhiên, bạn nên thêm mã ngôn ngữ vào tên của mỗi tệp.
Yêu cầu về việc xác thực
Ngoài ra, bạn có thể bảo mật tệp của mình bằng tên người dùng và mật khẩu bằng cách sử dụng phương thức xác thực BASIC hoặc DIGEST.
NTLM không được hỗ trợ.
Mọi quyền được bảo lưu. Java là một nhãn hiệu đã đăng ký của Oracle và/hoặc chi nhánh của Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003eThis guide explains how to set up a hotel list using XML files hosted on your server, allowing Google to download them on a scheduled basis.\u003c/p\u003e\n"],["\u003cp\u003eHotel list files contain descriptive data for each property, such as name, address, and location, organized by property and requiring a separate file for each supported language.\u003c/p\u003e\n"],["\u003cp\u003eTo create a hotel list feed in XML, review file requirements, code files according to the Hotel List XML Reference, and validate them using the provided schema.\u003c/p\u003e\n"],["\u003cp\u003eAfter validation, host the feed on your server, ensuring it meets the hosting requirements including server accessibility, directory structure, file size and naming conventions, and optional authentication.\u003c/p\u003e\n"],["\u003cp\u003eGoogle will fetch the hosted feed at a scheduled frequency, and if there are no errors, your hotel list will be published and properties matched in Google Maps will be displayed in your Hotel Center account.\u003c/p\u003e\n"]]],[],null,["# Set Up a Hotel List in XML\n\n| **Important:** Before continuing, review [How to set up your hotel\n| inventory](https://support.google.com/hotelprices/answer/9218458) to determine the best method for setting up a [hotel list](//hotelcenter.google.com/properties/allhotels) for your properties, such as [hotels or vacation rentals](https://support.google.com/hotelprices/answer/9970971).\n\nTo set up your hotel list, you can use one of these methods:\n\n- Provide a CSV or XML file\n- Upload a file from Hotel Center\n- Host a file on a server\n\nThis guide describes how to set up a hotel list using XML files and host the\nXML feed on your server for Google to download your XML files at the requested\nschedule. For other methods of setting up a hotel list, see\n[How to set up your hotel inventory](https://support.google.com/hotelprices/answer/9218458).\n\nAbout hotel lists in XML\n------------------------\n\nA hotel list file contains descriptive data---such as property name,\naddress, GeoCode location---organized by property, for all of the\nproperties in a Hotel Center account.\n| **Key Point:** A separate file is required for each supported language. The language is specified with the `\u003clanguage\u003e` element.\n\nA very basic example of a hotel list file in the XML file format is shown\nbelow. This example shows only one of the several `\u003clisting\u003e` elements that are\nspecified in the file. Each `\u003clisting\u003e` element represents a property. \n\n \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n \u003clistings xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:noNamespaceSchemaLocation=\"http://www.gstatic.com/localfeed/local_feed.xsd\"\u003e\n \u003clanguage\u003een\u003c/language\u003e\n \u003clisting\u003e\n \u003c!-- The value of \u003cid\u003e must be unique to your site for all time. Do NOT reuse IDs. --\u003e\n \u003cid\u003e123abc\u003c/id\u003e\n \u003cname\u003eBelgrave House\u003c/name\u003e\n \u003caddress format=\"simple\"\u003e\n \u003ccomponent name=\"addr1\"\u003e6 Acacia Ave\u003c/component\u003e\n \u003ccomponent name=\"addr2\"\u003eFloor 5\u003c/component\u003e\n \u003ccomponent name=\"city\"\u003eLondon\u003c/component\u003e\n \u003ccomponent name=\"province\"\u003eGreater London\u003c/component\u003e\n \u003ccomponent name=\"postal_code\"\u003eSW1W 9TQ\u003c/component\u003e\n \u003c/address\u003e\n \u003ccountry\u003eGB\u003c/country\u003e\n \u003clatitude\u003e35.070374\u003c/latitude\u003e\n \u003clongitude\u003e-106.213648\u003c/longitude\u003e\n \u003cphone type=\"main\"\u003e123-456-7890\u003c/phone\u003e\n \u003ccategory\u003ehotel\u003c/category\u003e \u003c!-- You can use whatever property type categories you wish --\u003e\n \u003c/listing\u003e\n ...\n \u003c/listings\u003e\n\nCreate a hotel list in XML\n--------------------------\n\nTo create a hotel list feed in XML, follow these steps:\n\n1. Review the [file requirements](/hotels/hotel-prices/dev-guide/hlf#file-reqs).\n\n2. Code your files as described in the [Hotel List XML\n Reference](/hotels/hotel-prices/xml-reference/hotel-list-feed).\n\n3. Validate the files using the hotel list feed\n [schema](/hotels/hotel-prices/dev-guide/schemas).\n\nAfter validating your files, host the feed on your server. Alternatively, you\ncan manually [upload your list in Hotel\nCenter](https://support.google.com/hotelprices/answer/9218458#upload_a_hotel_list_feed).\n\nHost XML feed on your server\n----------------------------\n\nWith the Hotel List Pull delivery method, you can host a hotel list on your\nserver, and Google will fetch the feed at your preferred frequency. After you've\ncreated your hotel list and validated its XML files, do the following:\n\n1. Prepare the files for Google as described in [Hosting\n requirements](#hosting-reqs).\n\n2. Contact your Technical Account Manager (TAM) to set up the following:\n\n - A download schedule for Google, typically once a week\n - The download URL and authentication requirements\n\nIf there are no errors, your hotel list is published and all the properties\nthat are successfully matched in Google Maps are displayed on your Hotel\nCenter account, under the Properties tab.\n\nIf there are errors, Google shares the errors with you so that you can fix\nthem and prepare the files for download again.\n\n### Hosting requirements\n\nObserve the following requirements when hosting your XML feed:\n\n#### Server requirement\n\n- The server must be accessible through either HTTP or HTTPS.\n\n#### Directory requirements\n\nTo ensure that Google retrieves a complete snapshot of your data and does not\nattempt to download incomplete files, follow these guidelines when posting\nfiles to your HTTP server:\n\n- Develop and validate your feed's XML files in a directory other than the one\n Google fetches from, that is: Don't use the `download` directory.\n\n- After you've successfully validated your feed's XML files, create a symbolic\n link from the download directory to the newly created feed.\n\n- If you're providing a `.zip` file, include the XML files at the root level\n and not within the download directory.\n\n#### File requirements\n\n- Use plain text files and not a formatted file like a Microsoft Word\n file.\n\n- Make sure that the uncompressed XML file does not exceed 100 MB. Single or\n multiple XML files can be compressed into a single `.zip` file. There is no\n limit for zipped XML files or `.zip` files.\n\n- Name the files as follows:\n\n - For a single XML file, use \u003cvar translate=\"no\"\u003ePARTNER_NAME\u003c/var\u003e`_local.xml`.\n - For single or multiple XML files in a zip, use \u003cvar translate=\"no\"\u003ePARTNER_NAME\u003c/var\u003e`_local.xml.zip`\n\n The individual XML files in the zip can be named in any manner,\n however, we recommend appending a language code to each filename.\n | **Key Point:** Only **`STORED`** and **`DEFLATED`** compression methods are supported.\n\n#### Authentication requirements\n\n- Optionally, you can secure your files with a username and password using\n either BASIC or DIGEST authentication.\n\n- NTLM is not supported."]]