Beijing, China (CNN) -- A court in eastern China sentenced a man to death Saturday for attacking 29 kindergarten students and three teachers with a knife, state-run media said. 

The Taixing Intermediate People's Court found Xu Yuyuan, 47, guilty of intentional homicide after a half-day trial, Xinhua news agency said. 

Xu told the court that his rage against society motivated him in the April 29 attacks, according to Xinhua. But he appealed the death sentence, arguing that the punishment was too severe since no one died in the attacks, Xinhua said. 

Chinese penal code says a person can be convicted of intentional homicide for acting on an intent to kill, the news agency reported. 

A police probe found Xu had been unemployed since 2001, when he was fired by a local insurance company. He told police he carried out the attack because he was angry about a series of business and personal humiliations, Xinhua said. 

About 300 people attended Saturday's open trial, according to Xinhua. 

Xu's sentence was the second death penalty conviction after a recent spate of school attacks that have prompted public outrage across China. 

Zheng Minsheng, 42, was sentenced to death and executed on April 28 for attacking students in front of an elementary school in Fujian province, killing eight and wounding several others. Zheng also used a knife in the attacks, Xinhua reported. 

Authorities said Zheng carried out the attack because he was frustrated at "failures in his romantic life," the news agency said. 

At least four other such attacks on school children in China have been reported since March. 
What was the assailant's motive?
because he was angry about a series of business and personal humiliations