Code example for DatatypeFactory

Methods: newXMLGregorianCalendar

0
    @Override 
    public XMLGregorianCalendar toXMLCalendar() throws DatatypeConfigurationException
    { 
        if (calendar instanceof GregorianCalendar)
        { 
            return datatypeFactory.newXMLGregorianCalendar((GregorianCalendar) calendar);
        } 
        else 
        { 
            throw new MuleRuntimeException( 
                CoreMessages.createStaticMessage("org.mule.el.DateTime.toXMLCalendar() does not support non-gregorian calendars.")); 
        } 
    } 
 
    private int getTimeZoneOffset() 
    { 
        return calendar.get(Calendar.ZONE_OFFSET);
    } 
 
    @Override