更新:November 2007
下表介绍 XML 数据类型与公共语言运行库 (CLR) 类型之间的默认映射。
下表介绍 XML 数据类型与 CLR 类型的默认映射。
| .gif) 说明: | 
|---|
| 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 节点 | |
| Element 节点 | |
| Attribute 节点 | |
| Namespace 节点 | |
| Text 节点 | |
| Comment 节点 | |
| Processing Instruction 节点 |