minor XmlReader refactoring