資源
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
如要定義與 <info>
物件相關的補充資訊,請使用 <resource>
實體。
resource
實體子元素
元素名稱 |
選填 |
類型 |
CAP 和 Google 附註和規定 |
<resourceDesc> |
必要 |
string |
<resourceDesc> 元素的值是文字,可說明資源檔案的類型和內容。例如 map 和 photo 。
|
<mimeType> |
必要 |
string |
<mimeType> 元素的值是 MIME 媒體類型和子類型的 ID,如 RFC 2046 所述。
|
<size> |
選用 |
float |
<size> 元素的值是整數,表示資源檔案的大小 (以位元組為單位)。
|
<uri> |
選用 |
string |
<uri> 元素的值是資源檔案的完整絕對 URI,或是命名 <defeUri> 元素內容的相對 URI。
|
<defeUri> |
條件式 |
string |
<defeUri> 元素的值是資源檔案的 Base64 編碼資料內容。如果您無法使用 URI 擷取資源,則可以在透過單向資料連結傳送的廣播等訊息中,使用 <defeUri> 元素或改用 <uri> 元素。
|
<digest> |
選用 |
string |
<digest> 元素的值是代表從資源檔案計算出的數位摘要的程式碼。如要計算 <digest> 元素值,請使用 FIPS 180-2 所述的安全雜湊演算法 (SHA-1)。
|
範例
<resource>
<resourceDesc>Image file (GIF)</resourceDesc>
<mimeType>image/gif</mimeType>
<uri>http://www.dhs.gov/dhspublic/getAdvisoryImage</uri>
</resource>
<resource>
<resourceDesc>Peta Intensitas Guncangan</resourceDesc>
<mimeType>image/jpeg</mimeType>
<uri>https://bmkg-content-inatews.storage.googleapis.com/20230410074420.mmi.jpg</uri>
</resource>
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-29 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-29 (世界標準時間)。"],[],["The `\u003cresource\u003e` entity defines supplemental information for an `\u003cinfo\u003e` object. It utilizes sub-elements: `\u003cresourceDesc\u003e` (required) describes the resource's content, `\u003cmimeType\u003e` (required) specifies the MIME type, `\u003csize\u003e` (optional) indicates file size in bytes, `\u003curi\u003e` (optional) provides a file location URI. `\u003cdefeUri\u003e` (conditional) offers Base64 encoded data and `\u003cdigest\u003e` (optional) is a SHA-1 hash. The example shows usage for image files with descriptions, types, and URI locations.\n"]]