Java XML Date Create getXMLCurrentTime()

Here you can find the source of getXMLCurrentTime()

Description

get XML Current Time

License

Open Source License

Declaration

public static XMLGregorianCalendar getXMLCurrentTime() throws DatatypeConfigurationException 

Method Source Code

//package com.java2s;

import java.util.GregorianCalendar;

import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;

public class Main {
    public static XMLGregorianCalendar getXMLCurrentTime() throws DatatypeConfigurationException {
        GregorianCalendar gcal = new GregorianCalendar();
        XMLGregorianCalendar xcal = DatatypeFactory.newInstance().newXMLGregorianCalendar(gcal);
        return xcal;
    }/*from  w w w  .  j a  v a  2  s. co  m*/
}

Related

  1. dateToXmlGregorianCalendar(Calendar date)
  2. dateToXmlGregorianCalendar(Date d)
  3. dateToXMLGregorianCalendar(Date date)
  4. dateToXMLGregorianCalendar(Date date)
  5. getXMLCalendar(String xsdDateTimeStr)
  6. getXMLDate()
  7. getXMLDate(Date date)
  8. getXMLDate(Date dateTime)
  9. getXMLDate(final Calendar calendar)