對應 XML 資料型別至 CLR 類型
更新: November 2007
下表說明 XML 資料型別及 Common Language Runtime (CLR) 型別之間的預設對應。
下表說明 XML 資料型別至 CLR 型別的預設對應。
注意事項: |
---|
xs 及 xdt 前置詞分別對應至 http://www.w3.org/2001/XMLSchema 及 http://www.w3.org/2003/05/xpath-datatypes 命名空間 URI。 |
XML 型別 |
CLR 型別 |
---|---|
xs:anyURI |
|
xs:base64Binary |
Byte[] |
xs:boolean |
|
xs:byte |
|
xs:date |
|
xs:dateTime |
|
xs:decimal |
|
xs:double |
|
xs:duration |
|
xs:ENTITIES |
String[] |
xs:ENTITY |
|
xs:float |
|
xs:gDay |
|
xs:gMonthDay |
|
xs:gYear |
|
xs:gYearMonth |
|
xs:hexBinary |
Byte[] |
xs:ID |
|
xs:IDREF |
|
xs:IDREFS |
String[] |
xs:int |
|
xs:integer |
|
xs:language |
|
xs:long |
|
xs:gMmonth |
|
xs:Name |
|
xs:NCName |
|
xs:negativeInteger |
|
xs:NMTOKEN |
|
xs:NMTOKENS |
String[] |
xs:nonNegativeInteger |
|
xs:nonPositiveInteger |
|
xs:normalizedString |
|
xs:NOTATION |
|
xs:positiveInteger |
|
xs:QName |
|
xs:short |
|
xs:string |
|
xs:time |
|
xs:token |
|
xs:unsignedByte |
|
xs:unsignedInt |
|
xs:unsignedLong |
|
xs:unsignedShort |
|
xdt:dayTimeDuration |
|
xdt:yearMonthDuration |
|
xdt:untypedAtomic |
|
xdt:anyAtomicType |
|
xs:anySimpleType |
|
Document node |
|
Element node |
|
Attribute node |
|
Namespace node |
|
Text node |
|
Comment node |
|
Processing instruction node |