首页 新闻 会员 周边

无法显示 XML 页

0
悬赏园豆:5 [已关闭问题] 关闭于 2010-08-14 18:53

 

int records = 0;
StringBuilder sp
= new StringBuilder("<?xml version=\"1.0\" encoding=\"utf-8\" ?><item>");
List
<Article> AdList = ArticleInfo.getArticleInfoList(100, 2, "", 1, 5, out records);
sp.AppendFormat(
"<newis morelink=\"#\">");
foreach (Article ad in AdList)
{
sp.AppendFormat(
"<news links=\"{0}\" times=\"{1}\">\"{2}\"</news>","#","2010-8-10",ad.ArtName);
}
sp.AppendFormat(
"<\newis>");

sp.AppendFormat(
"<yewu>");
List
<Product> plis=ProductInfo.getProductInfoList(1,"");
foreach(Product ad in plis)
{
sp.AppendFormat(
"<yew tit=\"{0}\" images=\"{1}\" links=\"{2}\">\"{3}\"</yew>", ad.ProName, "../UpLoad/" + ad.PicUrl1, "Products.aspx",
JScript.curStr(ad.Summary,
100));
}
sp.AppendFormat(
"</yewu>");



sp.Append(
"</item>");
//XmlDocument xmldoc = new XmlDocument();
//xmldoc.LoadXml(
Response.ContentType = "text/xml";
Response.Charset
= "utf-8";
Response.Write(sp.ToString());
Response.End();

 

 

无法显示 XML 页。 使用 XSL 样式表无法查看 XML 输入。请更正错误然后单击 刷新按钮,或以后重试。 -------------------------------------------------------------------------------- 该位置上不允许有空白。处理资源 'http://localhost:8028/Readxml.aspx' 时出错。第 1 行,位置: 267

"...

 

后台代码:

 

问题补充: 解决了原来是标签给错了</>
霞大侠的主页 霞大侠 | 初学一级 | 园豆:5
提问于:2010-08-14 18:08
< >
分享
所有回答(1)
0

解决了可以关闭问题了。

kyo-yo | 园豆:5587 (大侠五级) | 2010-08-14 18:52
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册