10. What would the following code be used for?

July 28, 2008

 Overall, the purpose of this code is to generate an RSS feed for a WordPress blog entry.

It starts with a line of code that specifies a version of XML (1.0) and character encoding (Unicode 8-bit). The next lines of code are a programmer’s comment on the version of the WordPress, and the version of RSS software. The xmlns lines of code are XML namespaces, an advanced concept that allow you to include all kinds of optional data in your RSS feed (Pilgrim & Ruby, 2002).

According to the RSS Advisory Board (2007), the single <channel> element is subordinate to the <rss> element. The <channel> element contains information about the channel (metadata) and its contents. What follows are the metadata tags for the new WordPress blog, including the blog’s title, it’s URL, description, publication date, version of WordPress, and language of publication.

References

Pilgrim, M. & Ruby, S. (2002, October 24). How do I declare namespaces in my RSS feed?  Feed Validator. Retrieved July 28, 2008 from http://validator.w3.org/feed/docs/howto/declare_namespaces.html

RSS Advisory Board (2007, October 15). RSS 2.0 Specification. Retrieved July 28, 2008 from http://www.rssboard.org/rss-specification

 ****

<?xml version=”1.0″ encoding=”UTF-8″?>

<!– generator=”wordpress/1.5.1.3″ –>

<rss version=”2.0″

xmlns:content=”http://purl.org/rss/1.0/modules/content/”

xmlns:wfw=”http://wellformedweb.org/CommentAPI/”

xmlns:dc=”http://purl.org/dc/elements/1.1/”>

<channel>

<title>From the Dean</title>

<link>http://iis.syr.edu/ISTWP</link>

<description>Thoughts and news from Dean Raymond von Dran</description>

<pubDate>Fri, 08 Jul 2005 15:10:26 +0000</pubDate>

<generator>http://wordpress.org/?v=1.5.1.3</generator>

<language>en</language>

<item>

<title>Hello world!</title>

<link>http://iis.syr.edu/ISTWP/?p=1</link>

<comments>http://iis.syr.edu/ISTWP/?p=1#comments</comments>

<pubDate>Fri, 08 Jul 2005 15:10:26 +0000</pubDate>

<dc:creator>Administrator</dc:creator>

<category>Uncategorized</category>

<guid>http://iis.syr.edu/ISTWP/?p=1</guid>

<description><![CDATA[ Welcome to WordPress. This is your first post. Edit or delete it, then start blogging! ]]></description>

<content:encoded>

<![CDATA[ <p>Welcome to WordPress. This is your first post. Edit or delete it, then start blogging! </p>]]>

</content:encoded>

<wfw:commentRSS>http://iis.syr.edu/ISTWP/?feed=rss2&amp;p=1</wfw:commentRSS>

</item>

</channel>

</rss>

Entry Filed under: Development, Open Source. Tags: , .

Leave a Comment

hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Categories

Archives

Blogroll

 

July 2008
M T W T F S S
     
 123456
78910111213
14151617181920
21222324252627
28293031