Re: [Simple-support] Handling of ISO 8601 timestamps
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2011-01-28 07:53:12
|
Hi, I think this is indexed on nabble.com. However, what you want is a Matcher implementation to return a Transform for java.util.Date.class. If you look in the test cases you will see many examples of the use of Matcher and Transform, just grab the code and use it (all in the .zip download). Niall --- On Thu, 27/1/11, Kenny MacLeod <Ken...@tr...> wrote: > From: Kenny MacLeod <Ken...@tr...> > Subject: [Simple-support] Handling of ISO 8601 timestamps > To: sim...@li... > Received: Thursday, 27 January, 2011, 9:50 AM > First up, sorry if this is a FAQ on > this list, but the SF mailing list > seems to have no search facility. > > Anyway, I'm looking to use SimpleXml (on Android) to > process XML that > makes extensive use of ISO 8601 timestamps (as used by the > xs:datetime XML > schema type), e.g. 2011-01-27T17:47:14Z > > I would like to bind these to java.util.Date fields in my > model. Now, the > SimpleXml tutorial briefly mentions this concept, and the > existence of > "transformers", but gives no indication if these > transformers are > pluggable or configurable. > > I could, of course, just use Strings, and translate them as > required, but > the schema in question is very complex, with many datetime > fields, so this > would be inelegant at best. > > Is there a suggested solution to this problem? > > P.S. Any chance of this group being migrated somewhere more > useful, such > as Google Groups? The lack of a search facility is > maddening, given how > much useful information is in this list archive. > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 > USD value)! > Finally, a world-class log management solution at an even > better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer > expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support > |