|
Time component lost from Date: msg#00167text.xml.xmlbeans.user
Hi,
The getter for this element returns a Calendar Object. Things are fine as long as a Date value is set but if we want the time component and expect a DateTime, the time component seem to be lost from the Calendar's toString() value. By the current definition of DateTimeAny, Calendar object will use the format of the first element in the union member type list of DateTimeAny which is Date in this case so I am getting a Date string. If I change the type definition to :- <xs:simpleType name="DateTimeAny"> Calendar object picks the format of DateTime and returns timestamp string with the time. So my question is, does XMLBean have any feature by which instead of a Calendar Object from the bean getter I get an object which I can type cast appropriately to org.apache.xmlbeans.XMLDate or org.apache.xmlbeans.XMLDateTime. The actual type can depend on the availabilty of the time component. Is this possible in XMLBean right now? Thanks, Vineeth. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: ClassCastException: org.apache.xmlbeans.impl.values.XmlComplexContentImpl: 00167, Scott Hinkelman |
|---|---|
| Next by Date: | XMLBeans in Eclipse: 00167, Michael . Medwith |
| Previous by Thread: | RE: ClassCastException: org.apache.xmlbeans.impl.values.XmlComplexContentImpli: 00167, Radu Preotiuc-Pietro |
| Next by Thread: | RE: Time component lost from Date: 00167, Jacob Danner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |