다음 표에서는 XML 데이터 형식과 CLR(공용 언어 런타임) 형식 간의 기본 매핑에 대해 설명합니다.
비고
xs 접두사와 xdt 접두사는 각각 https://www.w3.org/2001/XMLSchema 네임스페이스 URI 및 https://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:gMonth |
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 |
참고하십시오
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET