replacing simplexml
changed message processing from simplexml to lxml