Implemented XML parsing for sending and receiving messages