The leader of Taiwan's largest opposition party has accepted an invitation from President Xi Jinping to visit the People's Republic of China.