ASP RSS 읽어오기
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Dim xmlHttp
Set xmlHttp = Server.CreateObject("MSXML2.XMLHTTP.3.0")
xmlHttp.Open "Get", RSS주소(받아들일), false
xmlHttp.Send()
'받아서 저장 ( 이게 요즘은 익숙하져? ㅋㅋ )
Dim RSSXML
RSSXML = xmlHttp.ResponseText
'분할을 위해 DOM객채로 저장합니다 ( 안그래도 상관없는데... 이게더 좋은거 같습니다 )
Dim xmlDOM
Set xmlDOM = Server.CreateObject("MSXML2.DomDocument.3.0")
xmlDOM.async = false
xmlDOM.LoadXml(RSSXML)
'요건 센스 ㅋㅋ
Set xmlHttp = Nothing
'DOM으로 저장한 객체중 item 노드로 뽑아내고 생성했던 객체는 소멸합니다.
Dim RSSItems
Set RSSItems = xmlDOM.getElementsByTagName("item")
Set xmlDOM = Nothing
'이 이후에 이제 배열의 갯수 - 1개로 돌려서

'items(i,0) : title
'items(i,1) : link
'items(i,2) : description
'items(i,3) : category
'items(i,4) : author
'items(i,5) : guid
'items(i,6) : comments
'items(i,7) : pubdate
Author: jklee@lenscloth.io
Link: https://lenscloth-ko.github.io.git/2008/08/21/ASP-RSS-읽어오기/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.