Microsoft HomeproductssearchsupportshopWrite Us   Microsoft Home
Magazine
 |  Community
 |  Workshop
 |  Tools & Samples
 |  Training
 |  Site Info

Workshop  |  XML (Extensible Markup Language)

XML Data types


In addition to the string and other primitive types defined by the XML 1.0 recommendation, the Microsoft XML processor supports a rich set of additional data types. This release also supports conversions between the primitive types and these rich data types.

Data types are referenced from the data type namespace. To use this namespace in a schema, it must be declared within the XML Schema schema. This documentation assumes that the data type namespace has been assigned the "dt" prefix.

The following rich data types are supported.

bin.base64 MIME-style Base64 encoded binary blob.
bin.hex Hexadecimal digits representing octets.
boolean 0 or 1, where 0 == "false" and 1 =="true".
char String, one character long.
date Date in a subset ISO 8601 format, without the time data. For example: "1994-11-05".
dateTime Date in a subset of ISO 8601 format, with optional time and no optional zone. Fractional seconds can be as precise as nanoseconds. For example, "1988-04-07T18:39:09".
dateTime.tz Date in a subset ISO 8601 format, with optional time and optional zone. Fractional seconds can be as precise as nanoseconds. For example: "1988-04-07T18:39:09-08:00".
fixed.14.4 Same as "number" but no more than 14 digits to the left of the decimal point, and no more than 4 to the right.
float Real number, with no limit on digits; can potentially have a leading sign, fractional digits, and optionally an exponent. Punctuation as in U.S. English. Values range from 1.7976931348623157E+308 to 2.2250738585072014E-308.
int Number, with optional sign, no fractions, and no exponent.
number Number, with no limit on digits; can potentially have a leading sign, fractional digits, and optionally an exponent. Punctuation as in U.S. English. (Values have same range as most significant number, R8, 1.7976931348623157E+308 to 2.2250738585072014E-308.)
time Time in a subset ISO 8601 format, with no date and no time zone. For example: "08:15:27".
time.tz Time in a subset ISO 8601 format, with no date but optional time zone. For example: "08:1527-05:00".
i1 Integer represented in one byte. A number, with optional sign, no fractions, no exponent. For example: "1, 127, -128".
i2 Integer represented in one word. A number, with optional sign, no fractions, no exponent. For example: "1, 703, -32768".
i4 Integer represented in four bytes. A number, with optional sign, no fractions, no exponent. For example: "1, 703, -32768, 148343, -1000000000".
i8 Integer represented in eight bytes. A number, with optional sign, no fractions, no exponent. For example: "1, 703, -32768, 1483433434334, -1000000000000000".
r4 Real number, with no limit on digits; can potentially have a leading sign, fractional digits, and optionally an exponent. Punctuation as in U.S. English. Values range from 3.40282347E+38F to 1.17549435E-38F.
r8 Same as "float." Real number, with no limit on digits; can potentially have a leading sign, fractional digits, and optionally an exponent. Punctuation as in U.S. English. Values range from 1.7976931348623157E+308 to 2.2250738585072014E-308.
ui1 Unsigned integer. A number, unsigned, no fractions, no exponent. For example: "1, 255".
ui2 Unsigned integer, two bytes. A number, unsigned, no fractions, no exponent. For example: "1, 255, 65535".
ui4 Unsigned integer, four bytes. A number, unsigned, no fractions, no exponent. For example: "1, 703, 3000000000".
ui8 Unsigned integer, eight bytes. A number, unsigned, no fractions, no exponent. For example: "1483433434334".
uri Universal Resource Identifier (URI). For example, "urn:schemas-microsoft-com:Office9".
uuid Hexadecimal digits representing octets, optional embedded hyphens that are ignored. For example: "333C7BC4-460F-11D0-BC04-0080C7055A83".

Primitive Types

The World Wide Web Consortium (W3C) XML 1.0 recommendation also defines enumerated types (notations and enumerations) and a set of tokenized types. These types, defined in the W3C XML 1.0 recommendation, are referred to as "primitive types" within this Microsoft XML documentation.

The primitive types include the following, defined in Section 3.3.1 of the W3C XML 1.0 Recommendation.

entity Represents the XML ENTITY type.
entities Represents the XML ENTITIES type.
enumeration Represents an enumerated type.
id Represents the XML ID type.
idref Represents the XML IDREF type.
idrefs Represents the XML IDREFS type.
nmtoken Represents the XML NMTOKEN type.
nmtokens Represents the XML NMTOKENS type.
notation Represents a NOTATION type.
string Represents a string type.

Supported Data Type Coercions

The following table lists the data type coercions supported by the Microsoft XML processor in Microsoft® Internet Explorer 5 Beta.

Data typeVariant type
stringVT_BSTR, VT_BOOL, VT_CY, VT_DATE, VT_VARIANT, VT_DECIMAL, VT_UII, VT_I2, VT_I4, VT_R4, VT_R8, VT_EMPTY, VT_NULL, VT_ARRAY
numberVT_BSTR, VT_BOOL, VT_CY, VT_VARIANT, VT_DECIMAL, VT_UII, VT_I2, VT_I4, VT_R4, VT_R8, VT_EMPTY, VT_NULL
intVT_BSTR, VT_BOOL, VT_VARIANT, VT_UII, VT_I2, VT_I4, VT_EMPTY, VT_NULL
floatVT_BSTR, VT_CY, VT_VARIANT, VT_DECIMAL, VT_UII, VT_I2, VT_I4, VT_R4, VT_R8, VT_EMPTY, VT_NULL
fixed.14.4 (currency)VT_BSTR, VT_CY, VT_VARIANT, VT_DECIMAL, VT_UII, VT_I2, VT_I4, VT_R4, VT_EMPTY, VT_NULL
booleanVT_BSTR, VT_BOOL, VT_VARIANT, VT_DECIMAL, VT_UII, VT_I2, VT_I4, VT_EMPTY, VT_NULL
dateTime.iso8601VT_BSTR, VT_DATE, VT_VARIANT
dateTime.iso8601tzVT_BSTR, VT_DATE, VT_VARIANT
date.iso8601VT_BSTR, VT_DATE, VT_VARIANT
time.iso8601VT_BSTR, VT_DATE, VT_VARIANT
time.iso8601tzVT_BSTR, VT_DATE, VT_VARIANT
i1VT_BSTR, VT_BOOL, VT_VARIANT, VT_DECIMAL, VT_EMPTY, VT_NULL
i2VT_BSTR, VT_BOOL, VT_VARIANT, VT_DECIMAL, VT_I2, VT_EMPTY, VT_NULL
i4VT_BSTR, VT_BOOL, VT_VARIANT, VT_DECIMAL, VT_I2, VT_I4, VT_EMPTY, VT_NULL
i8VT_BSTR, VT_BOOL, VT_CY, VT_VARIANT, VT_DECIMAL, VT_I2, VT_I4
ui1VT_BSTR, VT_BOOL, VT_VARIANT, VT_DECIMAL, VT_UI1, VT_EMPTY, VT_NULL
ui2VT_BSTR, VT_BOOL, VT_VARIANT, VT_UI1, VT_I2, VT_EMPTY, VT_NULL
ui4VT_BSTR, VT_BOOL, VT_VARIANT, VT_UI1, VT_I2, VT_I4, VT_EMPTY, VT_NULL
ui8VT_BSTR, VT_BOOL, VT_CY, VT_VARIANT, VT_DECIMAL, VT_UI1, VT_I2, VT_I4, VT_EMPTY, VT_NULL
r4VT_BSTR, VT_CY, VT_VARIANT, VT_DECIMAL, VT_I2, VT_I4, VT_R4, VT_EMPTY, VT_NULL
r8VT_BSTR, VT_CY, VT_VARIANT, VT_DECIMAL, VT_I2, VT_I4, VT_R4, VT_R8, VT_EMPTY, VT_NULL
float.IEEE.754.32VT_BSTR, VT_CY, VT_VARIANT, VT_DECIMAL, VT_I2, VT_I4, VT_R4, VT_EMPTY, VT_NULL
float.IEEE.754.64VT_BSTR, VT_CY, VT_VARIANT, VT_DECIMAL, VT_I2, VT_I4, VT_R4, VT_R8, VT_EMPTY, VT_NULL
uuidVT_BSTR, VT_VARIANT
uriVT_BSTR, VT_VARIANT
bin.hexVT_BSTR, VT_VARIANT, VT_ARRAY
charVT_BSTR, VT_VARIANT, VT_I2, VT_EMPTY, VT_NULL
string.ansiVT_BSTR, VT_VARIANT, VT_ARRAY

See Also

XML Schema Preview


Does this content meet your programming needs? Write us!

Back to topBack to top

© 1998 Microsoft Corporation. All rights reserved. Terms of use.

 

Magazine Home
Ask Jane
DHTML Dude
Extreme XML
For Starters
More or Hess
Servin' It Up
Site Lights
Web Men Talking
Member Community Home
Benefits: Freebies & Discounts
Benefits: Promote Your Site
Benefits: Connect with Your Peers
Benefits at a Glance
Online Special-Interest Groups
Your Membership
SBN Stores
Join Now
Workshop Home
Essentials
Content & Component Delivery
Component Development
Data Access & Databases
Design
DHTML, HTML & CSS
Extensible Markup Language (XML)
Languages & Development Tools
Messaging & Collaboration
Networking, Protocols & Data Formats
Reusing Browser Technology
Security & Cryptography
Server Technologies
Streaming & Interactive Media
Web Content Management
Workshop Index
Tools & Samples Home
Tools
Samples, Headers, Libs
Images
Sounds
Style Sheets
Web Fonts
Training Home
SBN Live Seminars
SBN Live Chats
Courses
Peer Support
CD-ROM Training
Books & Training Kits
Certification
SBN Home
New to SBN?
What's New on SBN
Site Map
Site Search
Glossary
Write Us
About This Site