[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

Subject: How to date type conversion between xml and Java
From: Jack Bush <netbeansfan@xxxxxxxxxxxx>
Date: Fri, 13 Aug 2010 07:17:57 -0700 (PDT)
 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.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.