public WeChatTextMessage(XmlDocument xml) : base(xml) { if (MsgType.Trim() == "text") { Content = xml.SelectSingleNode("xml").SelectSingleNode("Content").InnerText; } }
public BaseWeChatMessage(XmlDocument xml) { var xmlNode = xml.SelectSingleNode("xml"); ToUserName = xmlNode.SelectSingleNode("ToUserName").InnerText; FromUserName = xmlNode.SelectSingleNode("FromUserName").InnerText; CreateTime = xmlNode.SelectSingleNode("CreateTime").InnerText; MsgType = xmlNode.SelectSingleNode("MsgType").InnerText; if (MsgType.Trim() == "event") { EventName = xml.SelectSingleNode("xml").SelectSingleNode("Event").InnerText; EventKey = xml.SelectSingleNode("xml").SelectSingleNode("EventKey").InnerText; } }