<%
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 (the document is ready to go.) Status: "& XML. ReadyState & "<br>")
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 ("<a href=" "" "& Link. Item (0). Text & "" "target=" "_blank" ">" & title. Item (0). Text & "</a><br>")
Next
Else
Response.Write ("The document is not ready yet.) Status: "& XML. ReadyState & "<br>")
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 <> "Then" url = URL & ":" & ServerPort
Url=url&scriptname
If querystring <> "" Then url=url& "?" & QueryString
Getlocationurl=url
End Function
' <?xml version= ' 1.0 ' encoding= ' gb2312 '?>
<channel>
<item>
<title> Sina </title>
<link>http://www.111cn.net Tutorials </link>
</item>
<item>
<title>google</title>
<link>http://www.111cn.net</link>
</item>
<item>
<title> Baidu </title>
<link>http://www.111cn.net</link>
</item>
</channel>
%>