基本資料類型
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
下列一般規定適用於 XML 規格中基本資料類型的內容和格式。
xs:string
xs:dateTime
使用 YYYY-MM-DDThh:mm:ssXzh:zm
形式的 ISO-8601 格式,定義如下:
YYYY
表示年份。
MM
表示月份。
DD
表示日期。
T
表示符號「T」,並標示必要時間區段的開始位置。
hh
表示小時。
mm
表示分鐘。
ss
表示秒數。
X
代表下列其中一個符號:
zh
表示從前一個日期和時間到世界標準時間的偏移小時數,如果前一個時間為世界標準時間,則為 00
。
zm
表示從前一個日期和時間到世界標準時間的分鐘差異,如果前一個時間是世界標準時間,則為 00
。
舉例來說,如果要輸入 2002 年 5 月 24 日下午 16 點 49 分 (太平洋夏令時間),請使用 2002-05-24T16:49:00-07:00
。
請勿使用「Z」等字母時區代碼。您必須將世界標準時間 (UTC) 時區表示為 -00:00
。
xs:language
如 CAP 標準所述,請使用有效的 RFC 3066 識別碼代表語言。建議您只使用小寫字母指定主要語言代碼。
例如 en-US
。
除非另有註明,否則本頁面中的內容是採用創用 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 (世界標準時間)。"],[],["XML data type requirements include specific formatting for strings, date/times, and languages. Strings must have leading/trailing whitespace trimmed, be converted to title case for display when possible, and use XML escape characters. Date/times require ISO-8601 format (`YYYY-MM-DDThh:mm:ssXzh:zm`) and avoid alphabetic time zone designations, instead using `+`, `-`, `00:00`. Languages should adhere to RFC 3066 identifiers, primarily using lowercase tags like `en-US`.\n"]]