How to parse an atom feed?
Does anyone know how to parse an atom feed in php?
Also does anyone know how to syndicate content via an atom feed?
SitePoint Enthusiast
I'm not an expert, but isn't atom a lot like RSS (if not the same?) if so, read this: http://www.sitepoint.com/article/php...arsing-rss-1-0 .
And creating a feed should be easy, just get the data out of a database and use mysql_fetch_array() (or mysql_fetch_object()) and loop through it (process it row by row using a while()-statement). Put the field data in some sort of template every time you run though the loop and: you've made yourself a feed... right?
yes it is but exactly what is the markup for it? such as tags etc.
For the syntax of an Atom feed, may I suggest that you check out the documentation at atomenabled.org .
For parsing an Atom feed, here is a pretty good example.
Hope this helps.
SitePoint Enthusiast
Just look at the RSS (or Atom) feeds of big websites
Sitepoint blogs: http://www.sitepoint.com/blogs.rdf
BBC news: http://news.bbc.co.uk/rss/newsonline...age/rss091.xml
It should be fairly easy to make out what everything does (if I could do it, so will you ).
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks