我正在从feedburner获得XML数据,并在我的c#代码后面访问数据,如下所示:
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=cooklikecarolyn");
XmlNodeList subscribers = xmlDoc.GetElementsByTagName("entry");
Response.Write(subscribers[0].Attributes["circulation"].Value.ToString());
如何将此插入到我已经在页面底部的div中?
设置div runat="server ":
<div id="feedDiv" runat="server"></div>
然后在c#中设置div的InnerHtml或InnerText:
feedDiv.InnerHtml = subscribers[0].Attributes["circulation"].Value.ToString();