Here's a breakdown:
* Nationalism: This can be a positive force, promoting unity and patriotism within a country. However, it can also be harmful when it leads to aggressive actions against other nations or when it's used to justify discrimination against minorities within a country.
* Xenophobia: This is always a negative force, rooted in fear and prejudice. It can lead to discrimination, violence, and exclusion of people from other countries.
While both terms relate to prejudice based on country, their connotations and implications are different.