[C#] syntaxhighlighter_viewsource syntaxhighlighter_copycode
微信付款通知返回如下信息
<xml>
<appid><![CDATA[wx8261af4dcdbe9479]]></appid>
<attach><![CDATA[1490084]]></attach>
<bank_type><![CDATA[CFT]]></bank_type>
<cash_fee><![CDATA[100]]></cash_fee>
<fee_type><![CDATA[CNY]]></fee_type>
<is_subscribe><![CDATA[Y]]></is_subscribe>
<mch_id><![CDATA[1484638802]]></mch_id>
<nonce_str><![CDATA[dd68a90525824a5eae328a344aad1878]]></nonce_str>
<openid><![CDATA[ootlZwda9ehK2ypgSbrR7PTF6vug]]></openid>
<out_trade_no><![CDATA[148463880220171117222137687]]></out_trade_no>
<result_code><![CDATA[SUCCESS]]></result_code>
<return_code><![CDATA[SUCCESS]]></return_code>
<sign><![CDATA[CEFCB4A2D9EDD9400DD6146AE5545996]]></sign>
<time_end><![CDATA[20171117222206]]></time_end>
<total_fee>100</total_fee>
<trade_type><![CDATA[JSAPI]]></trade_type>
<transaction_id><![CDATA[4200000024201711175331618958]]></transaction_id>
</xml>
[C#] syntaxhighlighter_viewsource syntaxhighlighter_copycode
private int ReadXml()
{
string responseInfo = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
+ @"<xml>
<appid>
<![CDATA[wx8888888888888888]]>
</appid>
</xml>";
XmlDocument doc = new XmlDocument();
doc.LoadXml(responseInfo);
string xpathChiefComplaint = "/xml/appid";
XmlNode xnChiefComplaint = doc.SelectSingleNode(xpathChiefComplaint);
string nodeValue = xnChiefComplaint.InnerText;
}