Back to "رمز ASP لقراءة التلقيمات RSS... مع مرتبط XSLT..."

This is a viewer only at the moment see the article on how this works.

To update the preview hit Ctrl-Alt-R (or ⌘-Alt-R on Mac) or Enter to refresh. The Save icon lets you save the markdown file to disk

This is a preview from the server running through my markdig pipeline

ASP.NET Imported mostlylucidcouk XML

رمز ASP لقراءة التلقيمات RSS... مع مرتبط XSLT...

Tuesday, 11 May 2004

على الرغم من أنني سأضع هذا... بشكل أساسي سوف يأخذ RSS (أو أي أي XML) تغذية من مصدر خارجي وتحويله باستخدام نص XSLT محدد (اجرب هذا واحد لمحول RSS الأساسي... (بآلاف دولارات الولايات المتحدة)) على سبيل المثال:

الرد. Write(getXML("http://weblogs.asp.net/mainfeed.aspx""","../xslft/rsstransferf.xslt", 120)

SP إعراب ASP. net المدونات الشبكية الرئيسية تغذية مع a ثانية وقت مخبئة


Function getXML(sourceFile,xsltFile,cacheTime) 
'On Error Resume Next
if((DateDiff("s",Application.Value(sourceFile + "_Expr"),Now())>cacheTime) Or len(Application.Value(sourceFile))=0) then
dim styleFile 
dim source, style 
styleFile = Server.MapPath(xsltFile)

Dim xmlhttp
Set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0")
xmlhttp.Open "GET", sourceFile, false
xmlhttp.Send

set source = Server.CreateObject("Microsoft.FreeThreadedXMLDOM")
source.async = false 
source.loadxml(xmlhttp.ResponseText) 
set style = Server.CreateObject("Microsoft.FreeThreadedXMLDOM")
style.async = false 
style.load(styleFile) 
outputHtml = source.transformNode(style) 
if(err.number = 0) then
Application.Lock
Application(sourceFile) = outputHtml
Application.Value(sourceFile + "_Expr") = now()
Application.UnLock
getXML = outputHtml
else
getXML = Application.Value(sourceFile)
end if

set source = nothing 
set style = nothing 
else
getXML = Application.Value(sourceFile)
end if
On Error Goto 0
End Function 
logo

© 2026 Scott Galloway — Unlicense — All content and source code on this site is free to use, copy, modify, and sell.