Default Data Type Mapping of XML Schema and Java


What is the Default Data Type Mapping of XML Schema and Java defined in JAXB API?



Java Architecture for XML Binding (JAXB) is a Java API that allows Java developers to map Java classes to XML representations.

The JAXB 2.2 release defines the following default mapping between XML Schema data types and Java data types:

XML	Schema Datatype   Java Datatype
-------------------   -------------
xsd:string            java.lang.String                        
xsd:integer           java.math.BigInteger                    
xsd:int               int                                     
xsd.long              long                                    
xsd:short             short                                   
xsd:decimal           java.math.BigDecimal                    
xsd:float             float                                   
xsd:double            double                                  
xsd:boolean           boolean                                 
xsd:byte              byte                                    
xsd:QName             javax.xml.namespace.QName               
xsd:dateTime          javax.xml.datatype.XMLGregorianCalendar 
xsd:base64Binary      byte[]                                  
xsd:hexBinary         byte[]                                  
xsd:unsignedInt       long                                    
xsd:unsignedShort     int                                     
xsd:unsignedByte      short                                   
xsd:time              javax.xml.datatype.XMLGregorianCalendar 
xsd:date              javax.xml.datatype.XMLGregorianCalendar 
xsd:g*                javax.xml.datatype.XMLGregorianCalendar 
xsd:anySimpleType     java.lang.Object for elements            
xsd:anySimpleType     java.lang.String for attributes          
xsd:duration          javax.xml.datatype.Duration             
xsd:NOTATION          javax.xml.namespace.QName               


Examples for JAXB (Java Architecture for XML Binding)

⇒⇒FAQ for jaxb-*.jar - Java Architecture for XML Binding

2018-05-19, 221👍, 0💬