Exporting XML to .txt plain text file in Dynamics AX

This is with regards to the posts in this thread.http://microsoft.public.axapta.programming.narkive.com/32IFWvdU/dax-4-0-aif-only-xml-format-possible-for-outbound-file

I am trying to do the exactly same thing in AX 2012. The thing that I am not understanding in this post is where it says, “in the writefile method of your new adapter you can do the xslt transform and you get the csv…”. How can I do xslt transform in the code in AX 2012. I tried to use XSLCompiledTransform class but it just supports supports xml and is used to transform XML to XML only. Any suggestions will be appreciated.