The suspect was detained and the injured children were receiving treatment, the propaganda department of Mizhi County in Shaanxi province said on its official social media account.
The incident took place at around 6:10 pm local time, the department said, without providing further details.
The ages of the children were not given, but middle schoolers are usually between 12 and 15 years old in China.
Knife attacks are not uncommon in the country.
In February, a knife-wielding man with a personal grudge killed a woman and injured 12 others in a busy Beijing shopping mall -- a rare act of violence in the heavily policed capital.
Last year, a man armed with a kitchen knife killed two people and wounded nine others in a supermarket in the southern city of Shenzhen.
And in January 2017, a man armed with a kitchen knife stabbed and wounded 11 children at a kindergarten in China's southern Guangxi Zhuang autonomous region.
History of attacks
Attacks have also targeted schoolchildren in the past.
In January 2017, a man armed with a kitchen knife stabbed and wounded 11 children at a kindergarten in China's southern Guangxi Zhuang autonomous region.
In February 2016, a knife-wielding assailant wounded 10 children in Haikou, in the southern island province of Hainan, before committing suicide.
In 2014, state media reported that a man stabbed three children and a teacher to death and wounded several others in a rampage at a primary school that refused to enrol his daughter.
That followed a March 2013 incident in which a man killed two relatives and then slashed 11 people, including six children, outside a school in China's commercial hub Shanghai.
The events have forced authorities to increase security around schools and led to calls for more research into the root causes of such acts.
Violent crime has been on the rise in China in recent decades as the nation's economy has boomed and the gap between rich and poor has widened rapidly.
Studies have also described a rise in the prevalence of mental disorders, some of them linked to stress as the pace of life becomes faster and support systems wither.
In June last year, a bomb blast that killed eight people and injured dozens outside a kindergarten in Fengxian, eastern China, was blamed on a 22-year-old introvert with health problems who had written the words "death" and "destroy" on the walls of his apartment. Material to make a homemade explosive device was found in the home.
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)
Follow NDTV for latest election news and live coverage of assembly elections 2019 in Maharashtra and Haryana.
Subscribe to our YouTube channel, like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.