changed xml size count to bitesize to support two bytes characteres