| DatatypeFactory | Factory that creates new #newInstance() is used to create a new |
code | html |
| Duration | Immutable representation of a time span as defined in the W3C XML Schema 1.0 specification. A Duration object represents a period of Gregorian time, which consists of six fields (years, months, days, hours, minutes, and seconds) plus a sign (+/-) field. The first five fields have non-negative (>=0) integers or null (which represents that the field is not set), and the seconds field has a non-negative decimal or null. |
code | html |
| XMLGregorianCalendar | Representation for W3C XML Schema 1.0 date/time datatypes. |
code | html |
| DatatypeConfigurationException | Indicates a serious configuration error. |
code | html |
| DatatypeConstants | Utility class to contain basic Datatype values as constants. |
code | html |
| DatatypeConstants.Field | Type-safe enum class that represents six fields of the Duration class. | code | html |
| FactoryFinder | Implement pluggabile Datatypes. This class is duplicated for each JAXP subpackage so keep it in sync. |
code | html |
| FactoryFinder.ConfigurationError | Configuration Error. |
code | html |
| SecuritySupport | This class is duplicated for each JAXP subpackage so keep it in sync. | code | html |
XML/Java Type Mappings.
The javax.xml.datatype API provides XML/Java type mappings.
The following XML standards apply:
| W3C XML Schema Data Type | Java Data Type |
|---|---|
| xs:date | javax.xml.datatype.XMLGregorianCalendar |
| xs:dateTime | javax.xml.datatype.XMLGregorianCalendar |
| xs:duration | javax.xml.datatype.Duration |
| xs:gDay | javax.xml.datatype.XMLGregorianCalendar |
| xs:gMonth | javax.xml.datatype.XMLGregorianCalendar |
| xs:gMonthDay | javax.xml.datatype.XMLGregorianCalendar |
| xs:gYear | javax.xml.datatype.XMLGregorianCalendar |
| xs:gYearMonth | javax.xml.datatype.XMLGregorianCalendar |
| xs:time | javax.xml.datatype.XMLGregorianCalendar |
| XQuery 1.0 and XPath 2.0 Data Model | Java Data Type |
|---|---|
| xdt:dayTimeDuration | javax.xml.datatype.Duration |
| xdt:yearMonthDuration | javax.xml.datatype.Duration |
W3C XML Schema data types that have a "natural" mapping to Java types are defined by JSR 31: Java™ Architecture for XML Binding (JAXB) Specification, Binding XML Schema to Java Representations. JAXB defined mappings for XML Schema built-in data types include: