Changed _createCourses to use DOMDocument