1. Mach2 and Mach3 accept the same G code format so the post for Mach2 should be fine.
2. Change the file extension to .tap after you've posted the code or simply change the drop down box to "all file types" when selecting the file in Mach3. Text files (.txt) open just fine in Mach3. The file format is no different (.tap files are text files, too) just the file extension.