Blog RSS Reader data sorting

Source: Internet
Author: User
I plan to use Blog RSS Reader for personal use when I am idle. Today I will start collecting data.

Dim objHTTP, objXML, objXSL

Set objXSL = Server. CreateObject ("Microsoft. XMLDOM ")
ObjXSL. async = False
ObjXSL. load (Server. MapPath ("rss. xsl "))

Set objHTTP = Server. CreateObject ("Microsoft. XMLHTTP ")
ObjHTTP. open "GET", objURL, false
ObjHTTP. send

Set objXML = objHTTP. responseXML
ObjHTML = objXML. transformNode (objXSL)
ObjHTML = replace (objHTML ,"""","'")

Set objHTTP = Nothing

'Objhtml = Server. HTMLEncode (objHTML)

%>

Var rsscode;

Rsscode = "<% = objHTML %> ";
RSSbox. innerHTML = "";
If (rsscode = "")
{
RSSbox. innerHTML = "nothing found ";
}
RSSbox. innerHTML = rsscode

<? Xml version = "1.0" encoding = "GB2312"?>
<Xsl: stylesheet xmlns: xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0">
<Xsl: template match = "/">
<Ul>
<Xsl: apply-templates select = "// item"/>
</Ul>
</Xsl: template>

<Xsl: template match = "item">
<Li>
<Xsl: element name = "a">
<Xsl: attribute name = "href"> <xsl: value-of select = "link"/> </xsl: attribute>
<Xsl: attribute name = "title"> <xsl: value-of select = "PubDate"/> </xsl: attribute>
<Xsl: value-of select = "title"/>
</Xsl: element>
</Li>
</Xsl: template>

</Xsl: stylesheet>

New work of Chapter E of Mencius
MS XmlDom asynchronously loads Xml files

<Script>
Var xmldoc;
Function Load (){
Xmldoc = new ActiveXObject ("Msxml2.DOMDocument ");
Xmldoc. onreadystatechange = CheckState;
Xmldoc. resolveExternals = false;
Xmldoc. load (URL. value );
}
Function CheckState (){
Var state = xmldoc. readyState;
RESULTS. innerHTML + = "loading status =" + state + "<BR>"
If (state = 4 ){
Var err = xmldoc. parseError;
If (err. errorCode! = 0)
RESULTS. innerHTML + = err. reason + "<BR>"
Else
{
RESULTS. innerHTML + = "loaded successfully. "+" <BR>"
Alert (xmldoc. xml)
}
}
}
</Script>
URL: <input type = text size = 60 id = URL value = "http://dotnet.aspx.cc/Rss.aspx">
<Input type = button value = "XML" onclick = "Load ()">
<Div id = RESULTS style = "color: red; font-weight: bold;"> </div> </script>

 

Consuming RSS feeds on your web site
Http://www.dotnetbips.com/displayarticle.aspx? Id = 243

A Free Personal Web-based RSS News Reader
Http://reader.rocketinfo.com/desktop/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.