最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp 读取xml文档实例代码
时间:2022-07-02 23:03:50 编辑:袖梨 来源:一聚教程网
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="
If ServerPort "80" Then Url = Url & ":" & ServerPort
Url=Url&ScriptName
If QueryString "" Then Url=Url&"?"& QueryString
GetLocationURL=Url
End Function
'
http://ww*w*.11*1cn
https://www.**111*cn.net
https://www.**111*cn.net
%>
相关文章
- LCODER AI Agent问数实战(三):搭建元数据知识库 09-19
- AI 任务队列调度实战:并发限流、幂等重试与持久化 09-19
- 实时语音 AI 对话如何落地:从麦克风采集到数字人播报 09-19
- 小智断网后能运行到哪一步?从唤醒流程拆解端云分工 09-19
- 把 1.81 亿条裁判文书降为“假设”:为 AI 建立五级证据体系 09-19
- asp在iis7报错行号不准问题的解决方法 09-19