XML/Java Type Mappings.
See: Description
Class | Description |
---|---|
DatatypeConstants | Utility class to contain basic Datatype values as constants. |
DatatypeConstants.Field | Type-safe enum class that represents six fields of the |
DatatypeFactory | Factory that creates new |
Duration | Immutable representation of a time span as defined in the W3C XML Schema 1.0 specification. |
XMLGregorianCalendar | Representation for W3C XML Schema 1.0 date/time datatypes. |
Exception | Description |
---|---|
DatatypeConfigurationException | Indicates a serious configuration error. |
XML/Java Type Mappings.
javax.xml.datatype
API provides XML/Java type mappings.
The following XML standards apply:
W3C XML Schema Data Type | Java Data Type |
---|---|
xs:date | XMLGregorianCalendar |
xs:dateTime | XMLGregorianCalendar |
xs:duration | Duration |
xs:gDay | XMLGregorianCalendar |
xs:gMonth | XMLGregorianCalendar |
xs:gMonthDay | XMLGregorianCalendar |
xs:gYear | XMLGregorianCalendar |
xs:gYearMonth | XMLGregorianCalendar |
xs:time | XMLGregorianCalendar |
XQuery 1.0 and XPath 2.0 Data Model | Java Data Type |
---|---|
xdt:dayTimeDuration | Duration |
xdt:yearMonthDuration | 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:
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.