add some util methods in XmlReader