Fix a bug in XML parser

The bug affects only zh_CN locale but it is a real bug.