using System.Text.RegularExpressions;
public static void Main()
Regex regex = new Regex(@"^(.+)\/([^\/]+)$");
Console.WriteLine("Enter the path to the xml file");
string path = Console.ReadLine();
if(!regex.Match(path).Success)
throw new ArgumentException("The pattern of the path is not correct");
throw new ArgumentException($"The file inside the path: {path} does currently not exists");
Console.WriteLine("Enter the output path");
string outputPath = Console.ReadLine();
if(!regex.Match(outputPath).Success)
throw new ArgumentException("The pattern of the output path is not correct");
if(!File.Exists(outputPath))
throw new ArgumentException($"The file inside the path: {path}, does currently not exists");
Console.WriteLine($"An unxedpected error occurred: {ex.Message}");