Hi Ghania, I would assume that Castor XML does not have support for unmarshalling date/time values without a mapping file, as there's way too many combinations in terms of what data types (on the Java side) could be used.
In other words, please use partial mapping files for this, i.e. make use of the auto-complete feature as explained in the reference guide [1]. Regards Werner [1] http://www.castor.org/reference/html/ ghania ferrag wrote: > Hi Every One, > > I'm new to Castor and IÂ?m using it to marshall and umrshall my XML file. > I have an XML file that contain 2 elements objects, one of the object has 2 > fields ( String type and Date Type) > Example of my XML file > <?xml version="1.0" encoding="UTF-8"?> > <people> > <Person> > <name>myName2009</name> > <dateOfBirth>12-11-2009</dateOfBirth> > </Person> > <Employee> > <name>mySecondName</name> > <employeeID>PR2009</employeeID> > </Employee> > </people> > and my Person class is simple as follow : > public class Person implements java.io.Serializable { > private String name = null; > private Date dob = null; > public Person() { > super(); > } > public Person(String name) { > this.name = name; > } > public Date getDateOfBirth() { > return dob; > } > public String getName() { > return name; > } > public void setDateOfBirth(Date dob) { > this.dob = dob; > } > public void setName(String name) { > this.name = name; > } > } > > When I unmarshall my XML file I got both objects but only the fields of type > String that has the value, the other field with type Date is null( it's like > the unmarshalling process just set the String element) > > My question as I'm not using any mapping file to unmarshall my XML file, what > should I do in my XML file to allow to Castor to unmarchall my XML file with > all elements that was set in the XML file ? > > If you can guide me on this or any link where I can read more about the > unmarshalling without mapping file. > Thanks in advance for your response, > > My Best Regards, > Ghania > > > > Devenez un meilleur amigo grâce à Yahoo! Courriel > http://cf.promos.yahoo.com/courriel/visiteguidee2/ > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

