issue#4: added support for text message class and better support for xml