public string UpLoadWeChatNewsXMLurl() { string token = m_token; if (token == null) { return(""); } if (!File.Exists(Application.streamingAssetsPath + "/WeChatNews.xml")) { return(""); } string xml = File.ReadAllText(Application.streamingAssetsPath + "/WeChatNews.xml"); string encodedXml = xml.Replace("&", "&");/*.Replace("<", "<").Replace(">", ">").Replace("\"", """).Replace("'", "'");*/ File.Delete(Application.streamingAssetsPath + "/WeChatNews.xml"); File.WriteAllText(Application.streamingAssetsPath + "/WeChatNews.xml", encodedXml); Encoding encoding = Encoding.UTF8; IDictionary <string, string> parameters = new Dictionary <string, string>(); parameters.Add("name", "WeChatNews.xml"); string retString = HttpWebResponseUtility.Upload_Request(PriceUrl, parameters, encoding, Application.streamingAssetsPath + "/WeChatNews.xml", "WeChatNews.xml", token); return(retString); }
public string UpLoadXml() { string token = m_token; if (token == null) { return(""); } Encoding encoding = Encoding.UTF8; IDictionary <string, string> parameters = new Dictionary <string, string>(); parameters.Add("name", "discountsInfo.xml"); string retString = HttpWebResponseUtility.Upload_Request(PriceUrl, parameters, encoding, Application.streamingAssetsPath + "/discountsInfo.xml", "discountsInfo.xml", token); return(retString); }