<xml>
<ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]></FromUserName>
<CreateTime>1348831860</CreateTime>
<MsgType><![CDATA[text]]></MsgType>
<Content><![CDATA[this is a test]]></Content>
<MsgId>1234567890123456</MsgId>
</xml>
msg_type = Nokogiri::XML(request.body.read).xpath('//MsgType').text
@to_user_name = Nokogiri::XML(request.body.read).xpath('//ToUserName').text
@user_name = Nokogiri::XML(request.body.read).xpath('//FromUserName').text
msg_type 能获取到数据
@to_user_name 怎么为空的?
@user_name 怎么为空的?