possible issue with corelib parsing item20 pubDate

7 views
Skip to first unread message

Jay

unread,
Feb 5, 2008, 12:45:29 PM2/5/08
to ActionScript 3 Syndication Library
The error is from corelib parsing a pubDate variable. I get the below
error when trying the below two lines of code:

var day:Date = item.pubDate; // item is an Item20
var dayStr:String = day.toDateString(); // toString is not working
either

Error: Unable to parse the string [2/5/2008 10:41:56 AM] into a date.
The internal error was: TypeError: Error #1010: A term is undefined
and has no properties.
at com.adobe.utils::DateUtil$/parseRFC822()[C:\Development
\ContractProjects\Adobe\as3corelib\src\com\adobe\utils\DateUtil.as:
460]
at com.adobe.xml.syndication::ParsingTools$/dateCheck()[C:\Documents
and Settings\mchamber\My Documents\src\flashplatform\projects
\xmlsyndication\trunk\src\actionscript3\com\adobe\xml\syndication
\ParsingTools.as:116]
at com.adobe.xml.syndication.rss::Item20/get pubDate()[C:\Documents
and Settings\mchamber\My Documents\src\flashplatform\projects
\xmlsyndication\trunk\src\actionscript3\com\adobe\xml\syndication\rss
\Item20.as:161]
at NGService/parseRSS()[C:\Documents and Settings\guolong.li\workspace
\NGService\NGService.mxml:87]
at NGService/onDataLoad()[C:\Documents and Settings\guolong.li
\workspace\NGService\NGService.mxml:55]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()

Mike Chambers

unread,
Feb 5, 2008, 4:37:31 PM2/5/08
to as3syndi...@googlegroups.com
Can you post the date you are trying to parse (i.e. the data in the
RSS feed)?

Thanks...

mike chambers

me...@adobe.com

Guolong Li

unread,
Feb 8, 2008, 3:30:23 PM2/8/08
to as3syndi...@googlegroups.com
Sorry Mike for my late response. Turns out it is the feed I am trying to parse happen to have a non-RSS 2.0 pubDate (url is "http://www.newsgator.com/MySyndicationRSS.aspx?uid=254827&fid=391189". It is having a string "2/8/2008 1:21:56 PM" rather than a Date object like "Fri Feb 8 2008". Not sure what we should do. Should the library be more tolerant since it is hard to enforce standard and hard to tell a retrieved feed is which version?
Thanks
Guolong

Mike Chambers

unread,
Feb 11, 2008, 2:19:26 PM2/11/08
to as3syndi...@googlegroups.com
Yeah. Christian has made some fixes so it at least wont throw an
exception (although it won't be able to parse dates that dont confirm
to the spec).

mike chambers

me...@adobe.com

Reply all
Reply to author
Forward
0 new messages