XmlRootAttribute.DataType プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > XmlRootAttribute.DataType プロパティの意味・解説 

XmlRootAttribute.DataType プロパティ

XML ルート要素の XSD データ型を取得または設定します。

名前空間: System.Xml.Serialization
アセンブリ: System.Xml (system.xml.dll 内)
構文構文

解説解説

XSD の単純データ型と、それに相当する .NET データ型の表を次に示します。

XSD base64Binary データ型と XSD hexBinary データ型の場合は、Byte 構造体の配列を使用し、DataType プロパティがデータ型に応じて "base64Binary" または "hexBinary" に設定されている XmlRootAttribute を適用します。XSD time データ型と XSD date データ型の場合は、DateTime 型を使用し、DataType が "date" または "time" に設定されている XmlRootAttribute を適用します。

文字列に割り当てられたすべての XSD 型について、DataType プロパティが XSD 型に設定されている XmlRootAttribute を適用します。ただし、これで変更されるのはメンバのスキーマだけであり、シリアル化形式は変更されません。

メモメモ

このプロパティでは大文字と小文字が区別されるため、XSD データ型を正しく設定する必要があります。

メモメモ

バイナリ データは、XML 属性として渡すよりも XML 要素として渡す方が効率的です。

XML データ型の詳細については、W3C (World Wide Web Consortium) (www.w3.org) のドキュメント『XML Schema Part 2: Datatypes』を参照してください。

XSD データ型

.NET データ型

anyURI

String

base64Binary

Byte オブジェクトの配列

boolean

Boolean

byte

SByte

date

DateTime

dateTime

DateTime

decimal

Decimal

double

Double

ENTITY

String

ENTITIES

String

float

Single

gDay

String

gMonth

String

gMonthDay

String

gYear

String

gYearMonth

String

hexBinary

Byte オブジェクトの配列

ID

String

IDREF

String

IDREFS

String

int

Int32

integer

String

language

String

long

Int64

Name

String

NCName

String

negativeInteger

String

NMTOKEN

String

NMTOKENS

String

normalizedString

String

nonNegativeInteger

String

nonPositiveInteger

String

NOTATION

String

positiveInteger

String

QName

XmlQualifiedName

recurringDate

String

duration

String

string

String

short

Int16

time

DateTime

token

String

unsignedByte

Byte

unsignedInt

UInt32

unsignedLong

UInt64

unsignedShort

UInt16

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
XmlRootAttribute クラス
XmlRootAttribute メンバ
System.Xml.Serialization 名前空間



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

XmlRootAttribute.DataType プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



XmlRootAttribute.DataType プロパティのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS