XENOPHOBIA -- we associate that unreasonable fear of foreigners with China the way we associate militarism with Germany, paranoia with Russia. With the Boxer Rebellion of 1900, in which the Chinese stunned the world by massacring hundreds of foreigners, Chinese xenophobia entered the long and popular list of stereotypes we maintain for nations.

So no wonder that the world media reacted with alarm and alacrity when during a May 19 riot following a 2-1 loss to Hong Kong in World Cup soccer, a Chinese mob seemed to be attacking every foreigner in sight -- not just those from Hong Kong but Westerners.

And no wonder that, for many Chinese, particularly in the government, it was more than an embarrassment. On June 4, the official Xinhua news agency said that when it comes to sports activity, the riot at the Peking Workers' Stadium caused "the most serious destruction and harmful influence since the founding of the People's Republic of China."

According to Xinhua, "The stupid, frenzied, barbaric disruptive activities by rioters . . . are tantamount to insulting the dignity of the nation, damaging the state system and violating the law of the land."

For many foreigners who live here, mostly quarantined in designated areas, with stores and privileges that are off-limits to virtually all Chinese citizens, the attacks on automobiles driven by foreigners during the riot confirmed their suspicion that the old resentment is just as virulent as ever.

Indeed, who could blame them? Memories among foreigners are embarrassingly strong of the foreign enclaves in the old days when followers of Mao Tse-tung could take a visitor to a park and point out the sign forbidding entrance to dogs and Chinese.

Ironically, foreigners' privilege and isolation are still conspicuous. Even if they are mandated by the very Chinese government that drove out the last of the foreign occupiers, they can still inspire xenophobia, or so the theory would have it.

Two more stereotypes were evoked by foreign coverage as well.

The Chinese are often seen as incredibly orderly, disciplined, hard- working people with a strong respect for authority, the opposite of the ones seen at the stadium. The ongoing privileges of the foreign community depend on this now as in the old days. But throughout the years, we have also often held a view of the Chinese that is more threatening. The old yellow hordes image comes to mind.

My own guess is that when we start using words like xenophobia at this stage, we may be saying more about ourselves than about the Chinese.

Hatred of foreigners could come at some later stage in China's economic modernization program, should the expectations now rising among some Chinese be disappointed, as, I believe, in many cases they will be. Foreigners would make easy targets should targets be needed.

Some Chinese young people have a fascination with the West that can easily turn to jealousy, but the strongest jealousies in Chinese society at the moment seem to be directed at other Chinese. Based on a number of incidents, Hong Kong Chinese and some other overseas Chinese visitors to the mainland who sometimes flaunt their wealth rouse considerable resentment.

China's national soccer team, representing a billion people, lost to a team from tiny, British imperialistic Hong Kong, representing a very small portion of the Chinese people -- a mere pimple of an island on the underside of China. The loss was a national disgrace, in the view of some Chinese, who have apparently come to expect more of the teams that play at the nation's favorite sport.

Furthermore, one Chinese student in Peking told me he hated the Chinese who, he believes, have profited excessively from a new economic situation under which some Chinese are now allowed to "become rich first," as the People's Daily newspaper put it in an article last month. As this student described it, those Chinese who could afford to ride in Peking's new taxis deserved to be resented, with one resentful group likely to be the considerable number of young people who have lost both their idealism and ideology.

Interviews with a number of foreigners and several Chinese of varying backgrounds indicate that there is, in fact, envy and resentment of the lifestyle of some foreigners here, particularly when they display arrogance, or a sense of superiority. But these negative sentiments do not seem to approach the poisonous bitterness of the Cultural Revolution of 1966-76. And the emotions one encounters are often mixed.

But at this point, at least, I believe that attitudes in Peking, where most of the foreigners are clustered, are far too fluid to deserve the label xenophobia. Take Sgt. Carl Hansen, a Canadian attached to the Canadian embassy here. Hansen happened to be driving home with his wife from an embassy party on the night of the riot. A crowd of Chinese men, some in their 30s, it appeared, and some younger, started pounding on his car at a traffic light near the stadium. Someone smashed through the rear window with a rock. Hansen rolled down his window and in Chinese said, "We're not from Hong Kong. We're Canadians."

The Chinese closest to the car laughed, according to Hansen's account. One started to practice his halting English. The mob let Hansen proceed on home, and went on with its business of attacking everything in sight,

Many foreigners leave Peking at the end of their tours frustrated and exhausted. They resent living in a goldfish bowl, always watched by curious Chinese whenever they venture out from their ghettos. They complain of health hazards. They resent that many Chinese seem to think that every foreigner is indescribably rich -- which he often is in Chinese terms. They resent being charged more for a given service than a Chinese is charged. They snap at the Chinese, and sometimes the Chinese snap back. If this adds up to xenophobia, then perhaps xenophobia is a two-way street.

It's also worth remembering that during the riot, the mob attacked everything in sight -- not just foreigners, but the Chinese police, Chinese buses, a Chinese-driven taxi, which they overturned, and a Chinese milkman, whose bottles they smashed. So much for stereotypes: xenophobia, docility, the horde and, of course, foreign privileges.