Here you can find the source of toDate(XMLGregorianCalendar xmlGregorianCalendar)
public static Date toDate(XMLGregorianCalendar xmlGregorianCalendar)
//package com.java2s; //License from project: Apache License import java.util.Date; import java.util.GregorianCalendar; import javax.xml.datatype.XMLGregorianCalendar; public class Main { public static Date toDate(XMLGregorianCalendar xmlGregorianCalendar) { if (null == xmlGregorianCalendar) { return null; }/*from www . j a v a 2s. com*/ GregorianCalendar gregorianCalendar = xmlGregorianCalendar.toGregorianCalendar(); return gregorianCalendar.getTime(); } }