Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RSS feed protocol for last build date
Message
From
26/08/2004 11:31:22
 
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00935761
Message ID:
00936645
Views:
25
>LastBuildDate is an optional schema item.

Ok

>What are you doing to parse this? Parsing Rss 2.0 is pretty straightforward - I have a class for that somewhere. In fact if you check your DevTeach CD I think the sample is on there (although I never actually showed it <g>).

I was not at DevTeach this year. :)

>If you manually parse the doc you have to make sure you check for null nodes returned and skip over those.

Yes, I do something like that. So far, this is where I am:
* expN1 Member ID
* expC1 Blog URL
FUNCTION BlogUpdate
PARAMETERS tnNumero,tcBlog
LOCAL lnOldSel,loHTTP,loXML,lcDate
lnOldSel=SELECT()
tcBlog=ALLTRIM(tcBlog)

loHTTP=CREATEOBJECT('Msxml2.ServerXMLHTTP')
loHTTP.Open('GET',tcBlog,.F.)

* Set a timeout in order to avoid long request to time out the server
loHTTP.setTimeouts(20000,20000,20000,20000) 

* We need to trap for possible errors
TRY
   loHTTP.Send()
CATCH
   RETURN
ENDTRY

* Just to make sure we have an object
IF TYPE('loHTTP.ResponseXML')<>'O'
   RETURN
ENDIF

loXML=loHTTP.ResponseXML

* Check for the presence of the node
loNodes=loXML.selectNodes('rss/channel/lastBuildDate')
IF loNodes.Length=0
   RETURN
ENDIF

lcDate=loXML.SelectSingleNode('rss/channel/lastBuildDate').Text

* Update the blog update
SELECT Member
SEEK tnNumero ORDER TAG Numero
REPLACE BlogUpdate WITH UTCToDateTime(lcDate)

SELECT(lnOldSel)
As you can see, I do not scroll all items for the pubDate node which is probably what you are making reference to. Just that piece of code would save me some time if you could show it to me.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform