|
Greetings,
I was experimenting with using Castor to marshal Java’s GregorianCalendar type, but the generated XML is invalid. I created a simple Person class with two variables one being a GregorianCalendar data type. Below is the generated XML:
<?xml version="1.0" encoding="UTF-8"?> <person> <name>Ryan 'Mad Dog' Madden</name> <date-of-birth first-day-of-week="1" lenient="true" minimal-days-in-first-week="1" time-in-millis="22306200000"> <gregorian-change>1582-10-04T18:00:00.000-06:00</gregorian-change> *** <time-zone DSTSavings="3600000" raw-offset="-21600000" DSTSavings="3600000" raw-offset="-21600000" xsi:type="java:sun.util.calendar.ZoneInfo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ID>America/Chicago</ID> <display-name>Central Standard Time</display-name> </time-zone> <time>1970-09-15T23:10:00.000-05:00</time> </date-of-birth> </person>
The *** line is the invalid line. The DSTSavings and row-offset attributes are repeated. Does anyone know why this is happening? I’ve tried generating the XML using a mapping file and without a mapping file and got the same results.
I am using castor-xml.0.9.5.3, xercesImpl - org.apache.xerces_4.0.13 and j2sdk1.4.2
Your help would be greatly appreciated.
Bob Berge
|
