//analyze xml message package main //all xml message has these headers type Header struct { ToUserName string FromUserName string CreatTime int64 MsgType string } //text message type TextMsg struct { Content string MsgId int64 } //picture type PicMsg struct { PicUrl string MeidaId string MsgId int64 } //voice type VoiceMsg struct { MeidaId string Format string MsgId int64 } //video type VideoMsg struct { MediaId string ThumbMediaId string MsgId int64 } //short video type ShortVideo struct { MeidaId string ThumbMediaId string MsgId int64 } //Location Info type Location struct { Location_X float64 Location_Y float64 Scale int Label string MsgId int64 } type LinkMsg struct { Title string Description string Url string MsgId int64 }