XSD Tutorial covers topics on XSD Data XSD Tutorial covers topic on XSD Data Types, XSD Text , XSD Mixed, XSD Indicators, XSD Substitution ,XSD Examples, XSD Numeric, XSD Elements.
We discuss XSD Numeric Data Type in detail
The XSD Numeric data are used to depicts the XML data in the form of Integer and Decimal.
<xs:integer> numeric data type
<xs:integer> data type depicts the integer value in the XML document
<xs:integer> example:
<xs:element name=”age” type=“xs:integer”/>
<age>28</age>
<xs:decimal> data type
<xs:decimal> data type depicts the decimal value in the XML document
<xs:decimal> example:
<xs:element name=”price” type=“xs:decimal”/>
<age>20.50</age>
Numeric Data Types
S. No | Name | Description |
1 | byte | value with 8-bit integer |
2 | decimal | decimal value 1.15 |
3 | int | value with 32-bit integer |
4 | integer | integer value |
5 | long | value with 64-bit integer |
6 | negativeInteger | an integer with negative values (-1,-2,-3…) |
7 | nonNegativeInteger | an integer with negative values (0,1,2…) |
8 | nonPostiveInteger | an integer with non positive values (0,-1,-2…) |
9 | positiveInteger | an integer with positive values (1,2…) |
10 | short | an unsigned 16-bit integer |
11 | unsignedShort | an unsigned 16-bit integer |
12 | unsignedLong | an unsigned 64-bit integer |
13 | unsignedInt | an unsigned 32-bit integer |
14 | unsignedByte | an unsigned 8-bit integer |