OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] is there a java utility class that can convert betweena XM

[ Lists Home | Date Index | Thread Index ]

I think there may be some problems trying to do this using the standard 
Java libraries (as one obscure example, I don't think the standard 
libraries support the proleptic Gregorian calendar used by WXS, so they 
would not work properly for dates more than a few centuries back), but 
you can lift code from my JiBX project at http://www.jibx.org for this 
purpose. The org.jibx.runtime.Utility class has full support for 
converting the Schema date formats to and from Java java.util.Dates. I 
suspect it's also much faster than the equivalent using the standard 
Java libraries.

Source is in the download, or you can get this class from CVS directly 
at 
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jibx/jibx/build/src/org/jibx/runtime/Utility.java 
The methods for converting dateTime values are serializeDateTime and 
deserializeDateTime.

 - Dennis


Bill Riegel wrote:

>Bill Riegel
>LandMark Graphics
>713-839-3388
>
>
>
>-----------------------------------------------------------------
>The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
>initiative of OASIS <http://www.oasis-open.org>
>
>The list archives are at http://lists.xml.org/archives/xml-dev/
>
>To subscribe or unsubscribe from this list use the subscription
>manager: <http://lists.xml.org/ob/adm.pl>
>
>  
>





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS