Sample code to save SDLXLIFF to target document

Hi everyone. Could someone please share with me on any sample code to save a SDLXLIFF into a target document?

I could do it in Trados Studio 2015, by opening a SDLXLIFF file (double-clicking on the file) , then File->Save Target As.

How may I do this in C#?

I was following the codes in producthelp.sdl.com/.../aa730e1e-2ab1-4d05-b57b-a2daccf64694.htm but how may I run the project to save to the target files?

I tried all the batch task types, but all did not generated the target document from the xliff.

Please help.

Thanks a million!