private void WriteItemDisplay(XmlWriter xmlWriter) { xmlWriter.WriteStartElement("display"); xmlWriter.WriteElementString("title", JobHelper.bSubstring(ProductTitle + NoHtml(PromotionTitle), 150)); xmlWriter.WriteElementString("realtitle", JobHelper.bSubstring(ProductTitle, 150)); xmlWriter.WriteElementString("price", JobHelper.bSubstring(CurrentPrice.ToString("0.00"), 40)); xmlWriter.WriteElementString("brand", GetBrand()); BaiduCategoryEntity category = BaiduBP.GetBaiduCategory(C3SysNo); xmlWriter.WriteElementString("tags", GetItemTags(category)); xmlWriter.WriteElementString("services", @"正规发票\全国联保\七天退换货"); xmlWriter.WriteElementString("image", JobHelper.bSubstring(PicUrl, 256)); xmlWriter.WriteElementString("store", "新蛋商城"); xmlWriter.WriteElementString("stock", OnlineQty > 0 ? "0" : "1"); xmlWriter.WriteElementString("description", JobHelper.CleanInvalidXmlChars(JobHelper.bSubstring(NoHtml(ProductDescLong), 2000))); xmlWriter.WriteElementString("city", "全国"); xmlWriter.WriteElementString("comments", ReviewCount.ToString()); xmlWriter.WriteElementString("commentsurl", JobHelper.bSubstring(string.Format( ReviewUrl, C3SysNo, HttpUtility.UrlEncode(Brand, System.Text.Encoding.GetEncoding("gb2312")), ProductID), 256)); xmlWriter.WriteElementString("firstclass", JobHelper.bSubstring(C1Name, 80)); xmlWriter.WriteElementString("secondclass", JobHelper.bSubstring(C2Name, 80)); xmlWriter.WriteElementString("thirdclass", JobHelper.bSubstring(C3Name, 80)); xmlWriter.WriteElementString("score", BaiduDA.GetProductScore(ProductSysNo, AppConfig.CompanyCode).ScoreString); xmlWriter.WriteEndElement(); }