[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Parsing day out of date format 10/12/00
<BirthMonth><xsl:value-of select="substring(.,1,2)"/></BirthMonth> <BirthDay><xsl:value-of select="substring(.,3,2)"/></BirthDay> <BirthYear><xsl:value-of select="substring(.,5,2)"/></BirthYear> > How would I go about parsing so> me xml like this: > > <BirthDate>10/12/00</BirthDate> If you can't rely on on two digits in each field (y2k bugs hit 2 digit year fields you know:-) then use substring-after and substring-before to split on / instead of using substring. Of course in most places 10/12/(20)00 would parse as 10th December rather than 12th October so it was good you showed the desired output.. David XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|