<?xml version="1.0" encoding="UTF-8"?>
<cup>
  <name>Copa del Rey</name>
  <short_name>Copa del Rey</short_name>
  <symbol>flag_spain.png</symbol>
  <sid>spain_cdr</sid>
  <last_week>45</last_week>
  <week_gap>2</week_gap>
  <property>national</property>
  <property>weak_at_home</property>

    <cup_rounds>
        <cup_round>
            <round_name>Preliminary Round</round_name>
            <home_away>0</home_away>
            <byes>0</byes>
            <delay>-21</delay>
            <choose_teams>
                <choose_team>
                    <choose_team_sid>spain5</choose_team_sid>
                </choose_team>
            </choose_teams>
        </cup_round>

        <cup_round>
            <round_name>1st Round</round_name>
            <home_away>0</home_away>
            <byes>0</byes>
            <delay>-22</delay>
            <choose_teams>
                <choose_team>
                    <choose_team_sid>spain4</choose_team_sid>
                    <number_of_teams>32</number_of_teams>
                    <start_idx>1</start_idx>
                    <end_idx>36</end_idx>
                    <randomly>1</randomly>
                </choose_team>
                <choose_team>
                    <choose_team_sid>spain3a</choose_team_sid>
                    <number_of_teams>8</number_of_teams>
                    <start_idx>1</start_idx>
                    <end_idx>8</end_idx>
                </choose_team>
                <choose_team>
                    <choose_team_sid>spain3b</choose_team_sid>
                    <number_of_teams>8</number_of_teams>
                    <start_idx>1</start_idx>
                    <end_idx>8</end_idx>
                </choose_team>
                <choose_team>
                    <choose_team_sid>spain3c</choose_team_sid>
                    <number_of_teams>8</number_of_teams>
                    <start_idx>1</start_idx>
                    <end_idx>8</end_idx>
                </choose_team>
                <choose_team>
                    <choose_team_sid>spain3d</choose_team_sid>
                    <number_of_teams>8</number_of_teams>
                    <start_idx>1</start_idx>
                    <end_idx>8</end_idx>
                </choose_team>
                <choose_team>
                    <choose_team_sid>spain2</choose_team_sid>
                </choose_team>
                <choose_team>
                    <choose_team_sid>spain1</choose_team_sid>
                    <number_of_teams>16</number_of_teams>
                    <start_idx>5</start_idx>
                    <end_idx>20</end_idx>
                </choose_team>
            </choose_teams>
        </cup_round>

        <cup_round>
            <round_name>2nd Round</round_name>
            <home_away>0</home_away>
            <byes>0</byes>
            <delay>-20</delay>
        </cup_round>

        <cup_round>
            <round_name>3rd Round</round_name>
            <home_away>0</home_away>
            <delay>-19</delay>
            <choose_teams>
                <choose_team>
                    <choose_team_sid>spain1</choose_team_sid>
                    <number_of_teams>4</number_of_teams>
                    <start_idx>1</start_idx>
                    <end_idx>4</end_idx>
                </choose_team>
            </choose_teams>
        </cup_round>

        <cup_round>
            <round_name>4th Round</round_name>
            <home_away>0</home_away>
            <delay>-11</delay>
        </cup_round>

        <cup_round>
            <round_name>Quarter Final</round_name>
            <home_away>0</home_away>
            <delay>-10</delay>
        </cup_round>

        <cup_round>
            <round_name>Semi Final</round_name>
            <home_away>1</home_away>
            <delay>-10</delay>
        </cup_round>

        <cup_round>
            <round_name>Final</round_name>
            <home_away>0</home_away>
            <neutral>1</neutral>
        </cup_round>
    </cup_rounds>
</cup>
