aspose file tools*
The moose likes XML and Related Technologies and the fly likes Unmarshalling date without timezone with jaxb Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Unmarshalling date without timezone with jaxb" Watch "Unmarshalling date without timezone with jaxb" New topic

Unmarshalling date without timezone with jaxb

Eugene Leung

Joined: Jun 19, 2006
Posts: 1
I am now trying to unmarshal a date into an XML file by using jaxb. But there is always a timezone offset shown in the generated element, like:


But what I want is:


The xsd is like:

<xs:complexType name="Date.CT">
<xs ocumentation>Pattern: YYYY-MM-DD
</xs ocumentation>
<xs:extension base="xs ate"/>

Because the xsd file is provided by 3rd party, I cannot change it in anyway. But I don't have any clue how to get rid of the timezone. I tried to clear the timezone, set the time to 0, but the timezone offset is still here.

I have tried to search for previous posts for related topic. But it seems that there is no answer for it.

Can anyone here please help me?
I agree. Here's the link:
subject: Unmarshalling date without timezone with jaxb
Similar Threads
ArrayOfType Problem
Schema design Help
jaxb - getting InvocationTargetException during parsing
xsd: how to define an element of type integer which can validate even if it is empty