[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] How to date type conversion between xml and Java
Hi All, B I need some advice on how to store the followingB dateB value from a xhtml document using JPA: cB B B <strong>Time:</strong> B B B B B <time>13/08/2010 00:10:19 am</time> B </p> B There is no problem retrieving this value using XPath query. However, the value returned is of type string yet JPA (futureStock.setCollectionTime()) expects type java.util.Date such asB the following code snippet: B B B B org.jdom.Element collection_time = ((org.jdom.Element)time_element).getChild("time"); B B B futureStock.setCollectionTime(collection_time.getTextNormalize()); B I would like to be in a position to retrieve both date and time separately at a later stage. B Any idea on how to overcome this issue? Thanks a lot, Jack-<p> c P.S. Apologies for asking Java type of question in an xslt forum but thought I try anyway since I am developing Java EE 5 development which consists of both technologies.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|