是否有可能使用 XML 提要中的特定字段设置新的 XML 文档?
public string xmlResult;
public void Page_Load(object sender, EventArgs args){
string url = string.Format("http://search.twitter.com/search.atom?q=test&show-user=true&rpp=10");
HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
{
StreamReader reader = new StreamReader(response.GetResponseStream());
xmlResult = reader.ReadToEnd();
Console.WriteLine("OUTPUT: " + xmlResult);
}
XmlDocument doc = new XmlDocument();
doc.LoadXml(xmlResult);
Response.ContentType = "text/xml";
Response.Write(doc.OuterXml);
}
我想制作一个具有特定字段的新 XML 文档,如下例所示。
<feed>
<entry>
<content></content>
<author></author>
<created_time></created_time>
</entry>
</feed>