//---------------------------------------------------------------------------------------------------
        private void ParseSinglePage(
            IImportRepository repository,
            HtmlDocument document,
            Event ev,
            string course_selector,
            string course_name_selector,
            string course_details_selector,
            string results_selector,
            string results_position_selector,
            string results_name_selector,
            string results_club_selector,
            string results_age_selector,
            string results_time_selector
        )
        {
            // Courses
            var course_nodes = document.DocumentNode.SelectNodes(course_selector);
            foreach (var course_node in course_nodes) {
                Course course = new Course();
                course.Event = ev;

                // Course name
                var name_node = course_node.SelectSingleNode(course_name_selector);
                course.Name = name_node.InnerText;

                // Course details
                var details_node = course_node.SelectSingleNode(course_details_selector);
                if (details_node != null) {
                    course.Length = Convert.ToDecimal(details_node.InnerText.Split(new char[] { ' ' })[0].TrimEnd(new char[] { 'k', 'm' }));
                    course.Climb = Convert.ToDecimal(details_node.InnerText.Split(new char[] { ' ' })[1].TrimEnd(new char[] { 'm' }));
                }

                // Commit the course
                repository.Course(ref course);

                // Results
                var results_nodes = course_node.SelectNodes(results_selector);
                foreach (var results_node in results_nodes) {
                    Result result = new Result();
                    result.Course = course;

                    // Position can be a number or null, if null then use the string as a code
                    var position_node = results_node.SelectSingleNode(results_position_selector);
                    try {
                        result.Position = Convert.ToInt32(position_node.ChildNodes[0].InnerText.TrimEnd(new char[] { 'r', 's', 't', 'n', 'd', 'h' }));
                    } catch (FormatException) {
                        result.Position = null;
                        result.Code = position_node.ChildNodes[0].InnerText;
                    }

                    // Name
                    var results_name_node = results_node.SelectSingleNode(results_name_selector);
                    result.Name = results_name_node.ChildNodes[0].InnerText;

                    // Club
                    var club_name_node = results_node.SelectSingleNode(results_club_selector);
                    result.ClubName = club_name_node.ChildNodes[0].InnerText;

                    // Age class
                    var age_class_node = results_node.SelectSingleNode(results_age_selector);
                    result.Age = age_class_node.ChildNodes[0].InnerText;

                    // Time
                    var time_node = results_node.SelectSingleNode(results_time_selector);
                    try {
                        result.Time = new TimeSpan(
                            0,
                            Convert.ToInt32(time_node.ChildNodes[0].InnerText.Split(new char[] { ':' })[0]),
                            Convert.ToInt32(time_node.ChildNodes[0].InnerText.Split(new char[] { ':' })[1])
                        );
                    } catch (FormatException) {
                        result.Time = null;
                    }

                    // Commit the result
                    repository.Result(ref result);
                }
            }
        }