Code example for DatatypeFactory

Methods: newXMLGregorianCalendar

0
        return factory.newDuration(input);
    } 
 
    public static XMLGregorianCalendar parseXMLGregorianCalendar(String input)
        throws IllegalArgumentException {
        return factory.newXMLGregorianCalendar(input);
    } 
 
    public static boolean isXMLGregorianCalendar(String input) {
        try { 
            factory.newXMLGregorianCalendar(input);
            return true; 
        } catch (IllegalArgumentException ex) {
            return false; 
        } 
    } 
 
    public static boolean isDuration(String input) {
        try { 
            factory.newDuration(input);
Contextual code suggestions in your IDE  Get Codota for Java