Code example for DatatypeFactory

Methods: newXMLGregorianCalendar

0
            if (d == null) { 
                return null; 
            } 
            GregorianCalendar calendar = new GregorianCalendar();
            calendar.setTime(d);
            return _dataTypeFactory.newXMLGregorianCalendar(calendar);
        } 
    } 
 
    public static class QNameDeserializer 
        extends FromStringDeserializer<QName>
    { 
        public QNameDeserializer() { super(QName.class); }
         
        @Override 
        protected QName _deserialize(String value, DeserializationContext ctxt)
            throws IllegalArgumentException 
        { 
            return QName.valueOf(value);
        } 
    }