[Simple-support] Transforming XML schema xs:dateTime type
Brought to you by:
niallg
|
From: Courtney, P. <Phi...@sr...> - 2011-07-30 00:37:00
|
In JAXB, a XML xs: dateTime type attribute is transformed with a
XMLGregorianCalendar class. When I try to use the XMLGregorianCalendar
class with the Simple Framework as shown below:
@Attribute(required = true)
protected XMLGregorianCalendar lastModified;
I get the following error:
Cannot use @org.simpleframework.xml.Attriture(empty=, name=,
required=true) to represent field 'lastModified' protected
javax.xml.datatype.XMLGregorianCalendar.
How can I use the Simple Framework to work with a xs:dateTime attribute?
Since this is one of the built-in types, it seems like it should be
straightforward. I tried using GregorianCalendar, but that class could
not parse the time part.
Thanks,
Phil
|