<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Prakash&#039;s Blog &#187; Python</title>
	<atom:link href="http://www.jpkannoth.com/category/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jpkannoth.com</link>
	<description>Innovation Explored</description>
	<lastBuildDate>Tue, 29 Sep 2009 16:27:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Build your Google News SiteMap using Python,Zope</title>
		<link>http://www.jpkannoth.com/2008/03/09/build-your-google-news-sitemap-using-pythonzope/</link>
		<comments>http://www.jpkannoth.com/2008/03/09/build-your-google-news-sitemap-using-pythonzope/#comments</comments>
		<pubDate>Sun, 09 Mar 2008 15:46:02 +0000</pubDate>
		<dc:creator>Prakash</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Zope]]></category>
		<category><![CDATA[zope python]]></category>

		<guid isPermaLink="false">http://www.jpkannoth.com/2008/03/09/build-your-google-news-sitemap-using-pythonzope/</guid>
		<description><![CDATA[Here is a small piece of code in Python – Zope using MySQL as the database. This will help you build a Google News Sitemap in 2 minutes.
# Import a standard function, and get the HTML request and response objects.
from Products.PythonScripts.standard import html_quote
request = container.REQUEST
response =  request.RESPONSE
response.setHeader('Content-Type', 'text/xml')
print ''
print ''
for item in context.sql.getNewsForToday():
print ''
build_url [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: 12pt; font-family: 'Times New Roman'">Here is a small piece of code in Python – Zope using MySQL as the database. This will help you build a <a href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;answer=42738" target="_blank">Google News </a>Sitemap in 2 minutes.</span><span id="more-193"></span><br />
<code># Import a standard function, and get the HTML request and response objects.<br />
from Products.PythonScripts.standard import html_quote<br />
request = container.REQUEST<br />
response =  request.RESPONSE<br />
response.setHeader('Content-Type', 'text/xml')<br />
print ''<br />
print '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:tal="http://xml.zope.org/namespaces/tal">'</urlset><br />
for item in context.sql.getNewsForToday():<br />
print '<url>'<br />
build_url = "http://www.yoursite.com/news/"+str(item.news_id)+".html?google"<br />
print '<loc>%s</loc>'%build_url<br />
print '<news:news>'<br />
#date w3c format<br />
print '<news:publication_date>%s</news:publication_date>'%(DateTime(item.post_date).HTML4())<br />
print '<news:keywords>%s</news:keywords>' %(item.keywords)<br />
print '</news:news>'<br />
print '</url>'<br />
print ''<br />
return printed</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jpkannoth.com/2008/03/09/build-your-google-news-sitemap-using-pythonzope/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
