菜单

宝马X3SS你会用了呢注册免费送38元体验金

2019年3月27日 - 注册免费送38元体验金

     如见Web2.0被吵的如火如荼,同时也有过多的评价褒贬不一。有人说Web2.0便是“一帮人在看天子的新装而已”。也有人说
Web2.0将是一场变革。无论这一个争议有没有价值,但本人信任,存在就有它的必然性。或许Web2.0更像是一种商业形式,3个价值观的变革而非技术。
     不管如何,它来了,你准备好了吗?
     说到Web2.0,就会涉嫌Blog、TAG、SNS、奥迪Q7SS、wiki那么些软件应用和xml、ajax等那么些新理论和技艺完毕。
RAV4SS毋容置疑正是其根本的行使之一。

     那么怎么着是奥迪Q3SS?它到底有如何用吧?

     凯雷德SS是站点与站点之间共享内容的一种简单方法(也叫做“聚合内容”),常常被用来音信和其他按顺序排列的网站,例如Blog网站。网站
提供奇骏SS输出,有利于让用户发现网站内容的换代。网站用户能够在客户端借助于类似新闻资源音讯阅读器等支持奔驰G级SS的音讯聚合工具软件,在不打开网站内容页面包车型的士事态下阅读帮助EnclaveSS输出的网站内容。
     EvoqueSS是依照XML的一种样式。并且存有的奥迪Q7SS文件都要根据万维网球联合会盟(W3C)站点宣布的XML
1.0专业。具体格式能够查一下CRUISERSS 2.0业内,那里就不再另行粘贴了。

上面是自个儿总括的两种LANDSS的技艺达成代码:

1.在线生成锐界SS聚合页

(1)创建Rss.aspx
<%@ Page language=”c#” Codebehind=”Rss.aspx.cs”
AutoEventWireup=”false” Inherits=”LiTianPing.Rss” %>
只留下这一行,别的的都删掉。

(2)后台代码;Koleosss.aspx.cs

  private void Page_Load(object sender, System.EventArgs e)
  {    
   Response.ContentType=”text/xml”;
   Response.Write(GetRSS());
  }

  /// <summary>
注册免费送38元体验金,  /// 取得聚合小说
  /// </summary>
  /// <returns></returns>
  public string GetRSS()
  {
   News t=new News();//自身的业务类
   DataSet ds=t.GetListByClass(1);//依照项目获得数码
   
   StringBuilder strCode=new StringBuilder();
   strCode.Append(“<?xml version=\”1.0\” encoding=\”utf-8\”
standalone=\”yes\” ?>”);
   strCode.Append(“<rss version=’2.0′
xmlns:dc=\”http://purl.org/dc/elements/1.1/\\“”);
   strCode.Append(”
xmlns:trackback=\”http://madskills.com/public/xml/rss/module/trackback/\\
“);
   strCode.Append(”
xmlns:wfw=\”http://wellformedweb.org/CommentAPI/\\
xmlns:slash=\”http://purl.org/rss/1.0/modules/slash/\\“>”);
   strCode.Append(“<channel>”);
   strCode.Append(“<title>李天平RSSDemo</title>”);
   strCode.Append(“<link>http://"+Request.ServerVariables\["SERVER\_NAME"\]+"&lt;/link&gt;
“);
   strCode.Append(“<description>天道酬勤</description>
“);  
   strCode.Append(“<copyright>Copyright 2005</copyright>
“);      
   
   foreach(DataRow row in ds.Tables[0].Rows)
   {
    string Id=row[“Id”].ToString();
    string title=row[“title”].ToString();
    string description=row[“description”].ToString();
    string pubdate=row[“pubdate”].ToString();
    string ClassId=row[“ClassId”].ToString();
    //string author=row[“author”].ToString();

    strCode.Append(“<item>”);
    strCode.Append(“<title>”+title+”</title>”);
    strCode.Append(“<link>http://"+Request.ServerVariables\["SERVER\_NAME"\]+"/NewsShow.aspx?ID="+Id+"&lt;/link&gt;”);
    strCode.Append(“<subject>”+description+”</subject>”);
    strCode.Append(“<description><![CDATA[“+description+”]]></description>”);    
    strCode.Append(“<PubDate>”+pubdate+”</PubDate>”);
    strCode.Append(“<category>”+ClassId+”</category>”);
    strCode.Append(“</item>”);    
   }
   strCode.Append(“</channel>”);
   strCode.Append(“</rss>”);  
   return strCode.ToString();
  }

 (3) XmlTextWriter完成方式2;Rss.aspx.cs

  string xmlDoc=”rss.xml”; 
 private void Page_Load(object sender, System.EventArgs e)
  {    
   xmlDoc=Server.MapPath(“.”)+xmlDoc;   
   GetRSS2();
   XmlDocument doc= new XmlDocument();
   doc.Load(xmlDoc);
   Response.ContentType = “text/xml”;
   doc.Save(Response.Output);
  }
  /// <summary>
  /// 取得聚合营品
  /// </summary>
  /// <returns></returns>
  public void GetRSS2()
  {
   News t=new News();
   DataSet ds=t.GetListByClass(1);
   
   XmlTextWriter writer = new XmlTextWriter(xmlDoc,Encoding.UTF8);
   writer.Formatting = Formatting.Indented;
   writer.WriteStartDocument(true);
   writer.WriteComment(“奥德赛SS页的兑现”);
   writer.WriteStartElement(“rss”);
   writer.WriteAttributeString(“version”,”2.0″);      
   writer.WriteStartElement(“channel”);   
   writer.WriteStartElement(“title”);
   writer.WriteString(“李天平RSSDemo”);
   writer.WriteEndElement();
   writer.WriteStartElement(“link”);   
   writer.WriteString(“[http://"+Request.ServerVariables\["SERVER\_NAME](http://%22+request.servervariables%5B%22server_name/)"\]);
   writer.WriteEndElement();   
   writer.WriteStartElement(“description”);
   writer.WriteString(“天道酬勤”);
   writer.WriteEndElement();
   writer.WriteStartElement(“copyright”);
   writer.WriteString(“Copyright 2005”);
   writer.WriteEndElement();
   writer.WriteStartElement(“language”);
   writer.WriteString(“zh-cn”);
   writer.WriteEndElement();  
      
   foreach(DataRow row in ds.Tables[0].Rows)
   {
    string Id=row[“Id”].ToString();
    string title=row[“title”].ToString();
    string description=row[“description”].ToString();
    string pubdate=row[“pubdate”].ToString();
    string ClassId=row[“ClassId”].ToString();
    //string author=row[“author”].ToString();

    writer.WriteStartElement(“item”);
    writer.WriteStartElement(“title”);
    writer.WriteString(title);
    writer.WriteEndElement();
    writer.WriteStartElement(“link”);
    writer.WriteString(“http://”+Request.ServerVariables\[“SERVER\_NAME”\]+”/NewsShow.aspx?ID=”+Id)
;
    writer.WriteEndElement();
    writer.WriteStartElement(“description”);
    writer.WriteCData(description);
    writer.WriteEndElement();
    writer.WriteStartElement(“pubDate”);
    writer.WriteString(pubdate);
    writer.WriteEndElement();
    writer.WriteStartElement(“category”);
    writer.WriteString(ClassId);
    writer.WriteEndElement();
    writer.WriteEndElement();  
   }
   writer.WriteEndElement();
   writer.WriteEndElement();
   writer.Flush();
   writer.Close();
 
  }
2.在线智跑SS阅读获取。

页面代码:
  <P style=”FONT-SIZE: 11px”>
   Feed种子:<asp:TextBox id=”FeedUrl” runat=”server”
Width=”440px”></asp:TextBox><BR>
   展现条数:<asp:TextBox id=”Num” runat=”server”
Width=”48px”></asp:TextBox></P>
  <P style=”FONT-SIZE: 11px”>
   <asp:Button id=”GetFeed” runat=”server”
Text=”获得RSS”></asp:Button><BR>
   <BR>
   <asp:Label id=”RssFeed”
runat=”server”></asp:Label></P>

后台代码:
  /// <summary>
  /// 得到要显得的Feed种子数据
  /// </summary>
  /// <param name=”RssUrl”></param>
  /// <param name=”showNewsCount”></param>
  /// <returns></returns>
  public string LoadRSS(string RssUrl, int showNewsCount)
  {
   string strRssList = “”;
   string strMsg;
   try
   {      
    XmlDocument objXMLDoc = new XmlDocument();   
    objXMLDoc.Load(RssUrl);  
    XmlNodeList objItems = objXMLDoc.GetElementsByTagName(“item”);    
  
    if(showNewsCount > 30)
     showNewsCount = 10;  
    if(showNewsCount < 1)
     showNewsCount = objItems.Count;
  
    string title=””;
    string link=””; 
    int i;

    if(objXMLDoc.HasChildNodes == true)
    {
     i = 1;
        foreach(XmlNode objNode in objItems)
     {
      if(i<=showNewsCount)
      {
       if(objNode.HasChildNodes == true)
       {
        XmlNodeList objItemsChild = objNode.ChildNodes;
        foreach(XmlNode objNodeChild in objItemsChild)
        {
         switch(objNodeChild.Name)
         {
          case “title”:
           title = objNodeChild.InnerText;
           break;
          case “link”:
           link = objNodeChild.InnerText;
           break;          
         }         
        }
        i = i+1;
        strRssList += “<a href=” + link +” target=_blank>” +
title + “</a><br>”; 
       }      
      }
     }       
    }
    strMsg = strRssList;
   }
   catch
   {
    strMsg = “奥德赛SS Feed 源数据出错!”;
   }
   return strMsg;
  }

  //获取按钮,获取钦点安德拉SS
  private void GetFeed_Click(object sender, System.EventArgs e)
  {
   if(FeedUrl.Text == “”)//RSS地址
   {
    KoleosssFeed.Text = “消息源不能够为空,您可刷新重试或关系管理员!”;
    return ;
   }  
   RAV4ssFeed.Text = Load瑞鹰SS(FeedUrl.Text,Convert.ToInt32(Num.Text));
//获取内定数目 
  }

3.无刷新动态更新的在线KugaSS阅读获取

<%@ Page language=”c#” Codebehind=”XmlHttp.aspx.cs”
AutoEventWireup=”false” Inherits=”LiTianPing.XmlHttp” %>
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN” >
<HTML>
 <HEAD>
  <title>XmlHttp</title>
  <meta name=”GENERATOR” Content=”Microsoft Visual Studio .NET
7.1″>
  <meta name=”CODE_LANGUAGE” Content=”C#”>
  <meta name=”vs_defaultClientScript” content=”JavaScript”>
  <meta name=”vs_targetSchema”
content=”http://schemas.microsoft.com/intellisense/ie5“>
  <style>td { font-size: 9pt}
  </style>
  <script>
  <!– 
  var oDiv
  var xh    
  function getXML()
  {   
   xh =new ActiveXObject(“Microsoft.XMLHTTP”);
   oDiv = document.getElementById(“rssitem”);
   oDiv.style.display= “”;
   try
   {
    //假使是地点改成下边语句间接读取
    //xh.open(“GET”,”/Rss.aspx”,false);    
    xh.open(“GET”,”Http://ltp.cnblogs.com/Rss.aspx”,false);
    xh.send(null);
    loadData(xh,oDiv);
   }
   catch(e)
   {
    error(oDiv);
   }
  }
  function loadData(xh,oDiv)
  {
   if (xh.readyState == 4)
   {
    xml = xh.responsexml;
    var i;
    var nodes = xml.selectNodes(“/rss/channel/item”);
    var bloglink = xml.selectSingleNode(“/rss/channel/link”).text;
    oDiv.innerHTML = “”;
    var html;    
    for(i=0;i<nodes.length;i++)
    {    
        
      html += “<div >”;
      html += ”    <div >”;
      html += ”        <a class=font1 href='”
+nodes[i].selectSingleNode(“link”).text + “‘ target=’_blank’>” +
nodes[i].selectSingleNode(“title”).text
+”</a><BR><BR>”;
      html += ”    </div>”;
      html += ”    <div >”;
      html += ”        ”
+nodes[i].selectSingleNode(“description”).text;
      html += ”    </div>”           
      //html += ”    </div>”;
      html += “</div><hr>”;

    }
    oDiv.innerHTML = html;
   }
   else
   {
    error(oDiv);
   }
  }

  function error(oDiv)
  {
   oDiv.innerHTML = “载入退步”;
  }
  –>
  </script>
 </HEAD>
 <body MS_POSITIONING=”GridLayout”
onload=”window.setTimeout(‘getXML()’,200);”>
  <form id=”Form1″ method=”post” runat=”server”>
   <div align=center>
   <table cellpadding=”0″ cellspacing=”0″ border=”0″
width=”80%”>
    <tr>
     <td>
      <div id=”rssitem”
style=”WIDTH:八成”>数据载入中…</div>
     </td>
    </tr>
   </table>
   </div>
  </form>
 </body>
</HTML>

相关文章

发表评论

电子邮件地址不会被公开。 必填项已用*标注

网站地图xml地图