* @param ele
* @return
* @throws DocumentException
*/
public static WxMsgVoiceEntity getMsgVoice(Element ele) throws DocumentException {
WxMsgVoiceEntity result = msgEntityFactory(WxMsgVideoEntity.class, ele);
WxItemVoiceEntity voice = new WxItemVoiceEntity();
voice.setMediaId(strVal(ele, "MediaId"));
voice.setFormat(strVal(ele, "Format"));
if (!StringUtils.isEmpty(ele.elementText("Recognition"))) {
voice.setRecognition(strVal(ele, "Recognition"));
}
result.setVoice(voice);
return result;
}