次の方法で共有


XML データ型から CLR 型へのマッピング

更新 : November 2007

XML データ型と共通言語ランタイム (CLR) 型の既定のマッピングを次の表に示します。

次の表は、XML データ型から CLR 型への既定のマッピングを示しています。

xa669bew.alert_note(ja-jp,VS.90).gifメモ :

xs および xdt のプレフィックスは、それぞれ http://www.w3.org/2001/XMLSchema および http://www.w3.org/2003/05/xpath-datatypes 名前空間 URI に対応します。

XML 型

CLR 型

xs:anyURI

Uri

xs:base64Binary

Byte[]

xs:boolean

Boolean

xs:byte

SByte

xs:date

DateTime

xs:dateTime

DateTime

xs:decimal

Decimal

xs:double

Double

xs:duration

TimeSpan

xs:ENTITIES

String[]

xs:ENTITY

String

xs:float

Single

xs:gDay

DateTime

xs:gMonthDay

DateTime

xs:gYear

DateTime

xs:gYearMonth

DateTime

xs:hexBinary

Byte[]

xs:ID

String

xs:IDREF

String

xs:IDREFS

String[]

xs:int

Int32

xs:integer

Decimal

xs:language

String

xs:long

Int64

xs:gMmonth

DateTime

xs:Name

String

xs:NCName

String

xs:negativeInteger

Decimal

xs:NMTOKEN

String

xs:NMTOKENS

String[]

xs:nonNegativeInteger

Decimal

xs:nonPositiveInteger

Decimal

xs:normalizedString

String

xs:NOTATION

XmlQualifiedName

xs:positiveInteger

Decimal

xs:QName

XmlQualifiedName

xs:short

Int16

xs:string

String

xs:time

DateTime

xs:token

String

xs:unsignedByte

Byte

xs:unsignedInt

UInt32

xs:unsignedLong

UInt64

xs:unsignedShort

UInt16

xdt:dayTimeDuration

TimeSpan

xdt:yearMonthDuration

TimeSpan

xdt:untypedAtomic

String

xdt:anyAtomicType

Object

xs:anySimpleType

String

ドキュメント ノード

XPathNavigator

要素ノード

XPathNavigator

属性ノード

XPathNavigator

名前空間ノード

XPathNavigator

テキスト ノード

XPathNavigator

コメント ノード

XPathNavigator

処理命令ノード

XPathNavigator

参照

その他の技術情報

System.Xml クラスでの型のサポート