最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp获取xml中的内容
时间:2022-06-30 09:24:49 编辑:袖梨 来源:一聚教程网
note.xml中的内容
http://www.sin*a*.c*om.cn
http://www.*go*o*gle.cn
http://www.***baidu.com
index.asp中的内容
h=GetLocationURL()'获取当前地址
h1=Split(h,"/")
h=Replace(h,h1(UBound(h1)),"note.xml")
Set http=Server.CreateObject("Microsoft.XMLHTTP")
http.Open "GET",h,False
http.send
Set xml=Server.CreateObject("Microsoft.XMLDOM")
xml.Async=False
xml.ValidateOnParse=False
xml.Load(http.ResponseXML)
If xml.ReadyState>2 Then
Response.Write("文档已经准备就绪。状态:"& xml.ReadyState &"
")
Set item=xml.getElementsByTagName("item")
For i=0 To (item.Length-1)
Set title=item.Item(i).getElementsByTagName("title")
Set link=item.Item(i).getElementsByTagName("link")
Response.Write("
")
Next
Else
Response.Write("文档还未准备就绪。状态:"& xml.ReadyState &"
")
End If
Set http=Nothing
Set xml=Nothing
%>
Function GetLocationURL()
Dim Url
Dim ServerPort,ServerName,ScriptName,QueryString
ServerName = Request.ServerVariables("SERVER_NAME")
ServerPort = Request.ServerVariables("SERVER_PORT")
ScriptName = Request.ServerVariables("SCRIPT_NAME")
QueryString = Request.ServerVariables("QUERY_STRING")
Url="http://"&ServerName
If ServerPort "80" Then Url = Url & ":" & ServerPort
Url=Url&ScriptName
If QueryString "" Then Url=Url&"?"& QueryString
GetLocationURL=Url
End Function
%>
运行index.asp文件
相关文章
- 新视觉影院官网电视剧如何进入-新视觉影院2026版官网一键跳转 01-19
- 魔道祖师漫画在线观看入口在哪?免费地址及平台推荐 01-19
- 豚豚剧官网在线观看入口-豚豚剧2026最新版高清在线观看 01-19
- 豚豚剧官网在线观看入口链接分享-豚豚剧2026最新资源在线看 01-19
- twitch官网入口地址-twitch网页版登录 01-19
- 追剧网官网高清免费在线观看-最新电视剧电影免下载 01-19