You'll need to use Microsoft.Office.Interop.InfoPath
instead of System.XML.Linq
. The infopath reference does contain a .Save() reference, hopefully the rest of the example you've found should help from then on.
If not, you might want to look at referencing System.Windows.Forms and using SaveFileDialog to allow the user to select their path.
SaveFileDialog dialog = new SaveFileDialog();
dialog.InitialDirectory = @"\\servername\share";
dialog.ShowDialog();