String type = (root.getElementsByTagName(TAG_MSGTYPE)).item(0).getTextContent();// filter CDATA... -- text/image/...
if (type.equalsIgnoreCase(MESSAGE_TEXT)) {// put it first,because most of time is text
message = new MessageText();
messageHadler = new MessageHandlerText();
} else if (type.equalsIgnoreCase(MESSAGE_EVENT)) {// do subscribe event
message = new MessageEvent();
messageHadler = new MessageHandlerEvent();
} else if (type.equalsIgnoreCase(MESSAGE_IMAGE)) {
message = new MessageImage();
messageHadler = new MessageHandlerImage();
} else if (type.equalsIgnoreCase(MESSAGE_LINK)) {