created factory for xml reader