I\'m looking for a simple method of converting between java.util.Date and javax.xml.datatype.XMLGregorianCalendar in both directions.
Here is the code that
From XMLGregorianCalendar to java.util.Date you can simply do:
java.util.Date dt = xmlGregorianCalendarInstance.toGregorianCalendar().getTime();