View Single Post
  #1 (permalink)  
Old March 25th, 2004, 03:31 PM
townsfolk townsfolk is offline
Registered User
 
Join Date: Mar 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default XSLT String Tokenizing

I need some help parsing out and manipulating some information.
I have an element that looks like:

<time>2004 Mar. 21 8:00 AM</time>

I need to break this apart into many elements that are correctly formatted as well..

what I need should look something like this.

<time>
   <hour>8</hour>
   <minute>0</minute>
   <day>21</day>
   <month>3</month>
   <year>2004</year>
</time>

I can handle the formatting - meaning - I can change the hour to 24 hour time and change the Months to Integers, my problem is separating out those pieces. Does anyone have any kind of code that might iterate though the string based on the 'space' being a separating character? Any help on this would be greatly appreciated.

EB