XSLT

This site has some great info on sample code for XSLThttp://www.topxml.com/xsltStylesheets/xslt_extension_functions.asp