<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Mental Jetsam</title>
	<atom:link href="http://mentaljetsam.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mentaljetsam.wordpress.com</link>
	<description>By Peter Finch</description>
	<lastBuildDate>Sat, 24 Oct 2009 01:10:17 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='mentaljetsam.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/ceacf381050333294fa38e25e7543d1b?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Mental Jetsam</title>
		<link>http://mentaljetsam.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mentaljetsam.wordpress.com/osd.xml" title="Mental Jetsam" />
		<item>
		<title>Teaching children about how to save money</title>
		<link>http://mentaljetsam.wordpress.com/2009/10/24/teaching-children-about-how-to-save-money/</link>
		<comments>http://mentaljetsam.wordpress.com/2009/10/24/teaching-children-about-how-to-save-money/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 01:05:42 +0000</pubDate>
		<dc:creator>pcfinch</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://mentaljetsam.wordpress.com/?p=107</guid>
		<description><![CDATA[A mate of mine recently wrote an great article on a simple &#8220;kid friendly&#8221; way to help children learn to save money and how to use it responsibly. I particularly like the &#8220;Give&#8221; section, as it&#8217;s not all about saving just for ourselves. If you have kids (or know someone who does) then this is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=107&subd=mentaljetsam&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A mate of mine recently wrote an great article on a simple &#8220;kid friendly&#8221; way to help children learn to save money and how to use it responsibly. I particularly like the &#8220;Give&#8221; section, as it&#8217;s not all about saving just for ourselves. If you have kids (or know someone who does) then this is a great idea and you should check it out here <a href="http://www.bhatt.id.au/blog/4-money-boxes-pocket-money-system-for-children/">Money Boxes Pocket Money System For Kids</a>.</p>
<p>Personally, I think we can all learn a lot from this article&#8230;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mentaljetsam.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mentaljetsam.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mentaljetsam.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mentaljetsam.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mentaljetsam.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mentaljetsam.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mentaljetsam.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mentaljetsam.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mentaljetsam.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mentaljetsam.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=107&subd=mentaljetsam&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mentaljetsam.wordpress.com/2009/10/24/teaching-children-about-how-to-save-money/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0d9bedc8c8efa836677a93972746d36d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pcfinch</media:title>
		</media:content>
	</item>
		<item>
		<title>Hyperlinks on Google Charts</title>
		<link>http://mentaljetsam.wordpress.com/2009/05/01/hyperlinks-on-google-charts/</link>
		<comments>http://mentaljetsam.wordpress.com/2009/05/01/hyperlinks-on-google-charts/#comments</comments>
		<pubDate>Fri, 01 May 2009 01:02:30 +0000</pubDate>
		<dc:creator>pcfinch</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://mentaljetsam.wordpress.com/?p=97</guid>
		<description><![CDATA[I love Google Charts! If you have ever needed to present information on a web page in a chart form, then Google Charts is really worth looking at. Once you have the chart on your webpage you may want to click on a entry of the legend (the little box that tells you what-is-what on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=97&subd=mentaljetsam&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I love <a href='http://code.google.com/apis/chart/'>Google Charts</a>! If you have ever needed to present information on a web page in a chart form, then Google Charts is really worth looking at. Once you have the chart on your webpage you may want to click on a entry of the legend (the little box that tells you what-is-what on the chart) to take you to more information on that section of  the chart. Sadly, the API does not currently have a way to add links to a chart.</p>
<p>This is a simple way to add hyperlinks (or hotspots) to a Google chart using an image USEMAP.</p>
<p><code>
<pre>
&lt;img src=&quot;http://chart.apis.google.com/chart?cht=lc&amp;chd=s:Uf9a,a3fG&amp;chs=250x100&amp;chl=1|2|3|4&amp;chco=000000,0000FF&amp;chma=0,30,30,30&amp;chdl=Desktops|Laptops&quot;
   usemap=&quot;#chart&quot; border=0&gt;
&lt;map name=&quot;chart&quot;&gt;
&lt;area shape=&quot;rect&quot; coords=&quot;199,31,249,49&quot; href=&quot;javascript:alert('More information on Desktops')&quot;&gt;
&lt;area shape=&quot;rect&quot; coords=&quot;199,50,249,69&quot; href=&quot;javascript:alert('More information on Laptops')&quot;&gt;
&lt;/map&gt;
</pre>
<p></code></p>
<p>The above HTML ends up looking like this. If you were [on a normal webpage] to click on the &#8220;Desktops&#8221;, or &#8220;Laptops&#8221; sections of the graphics you will see the javascript popup. Sadly, the USEMAP does not work on WordPress (this website) web pages, but you get the idea. You can of-course replace the javascript with a link to another page if you like, or even another chart!</p>
<p><img src="http://chart.apis.google.com/chart?cht=lc&amp;chd=s:Uf9a,Aasz&amp;chs=250x100&amp;chl=05|06|07|08&amp;chco=FF007F,007FFF&amp;chma=0,30,30,30&amp;chdl=Desktops|Laptops" border="0"></p>
<p>The down side of this approach is that it works great as long as the legend does not move or the size of the chart does not change. It seems to work pretty well with line and bar charts, so select your chart type carefully and play around and see what happens.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mentaljetsam.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mentaljetsam.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mentaljetsam.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mentaljetsam.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mentaljetsam.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mentaljetsam.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mentaljetsam.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mentaljetsam.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mentaljetsam.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mentaljetsam.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=97&subd=mentaljetsam&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mentaljetsam.wordpress.com/2009/05/01/hyperlinks-on-google-charts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0d9bedc8c8efa836677a93972746d36d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pcfinch</media:title>
		</media:content>

		<media:content url="http://chart.apis.google.com/chart?cht=lc&#38;chd=s:Uf9a,Aasz&#38;chs=250x100&#38;chl=05&#124;06&#124;07&#124;08&#38;chco=FF007F,007FFF&#38;chma=0,30,30,30&#38;chdl=Desktops&#124;Laptops" medium="image" />
	</item>
		<item>
		<title>C# SQL Server result in XML</title>
		<link>http://mentaljetsam.wordpress.com/2009/04/05/c-sql-server-result-in-xml/</link>
		<comments>http://mentaljetsam.wordpress.com/2009/04/05/c-sql-server-result-in-xml/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 10:55:55 +0000</pubDate>
		<dc:creator>pcfinch</dc:creator>
				<category><![CDATA[C#.NET]]></category>

		<guid isPermaLink="false">http://mentaljetsam.wordpress.com/?p=94</guid>
		<description><![CDATA[Formatting the output of a SQL query in XML using SQL Server is really simple and
very powerful if you want to deal with XML in the applications instead of normal
Record sets. The following is a simple SQL Query to
produce the results in XML. The XML essentially comes back to the application
as if it were one [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=94&subd=mentaljetsam&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Formatting the output of a SQL query in XML using SQL Server is really simple and<br />
very powerful if you want to deal with XML in the applications instead of normal<br />
Record sets. The following is a simple SQL Query to<br />
produce the results in XML. The XML essentially comes back to the application<br />
as if it were one column of a result set with one row.</p>
<pre><code>SELECT username AS '@username', password AS 'password'
FROM [dbo].users
WHERE username = @USERNAME
FOR XML PATH('User'), ROOT('Users'), TYPE ;
</code></pre>
<p>The PATH(&#8216;User&#8217;) option creates an XML &#8216;User&#8217; element for each row in the<br />
result set and the ROOT(&#8216;Users&#8217;) option wraps all the results in the &#8216;Users&#8217; element.<br />
For each of the columns in the result set simple specify the element name you want<br />
the data to appear in (e.g. &#8216;password&#8217;) or put a &#8216;@&#8217; at the start of the name<br />
to place the contents of the column in an attribute of the row element<br />
(e.g. &#8216;@username&#8217;). The output of the query is as follows.
<pre><code>&lt;Users&gt;
 &lt;User username=&quot;fmcske&quot;&gt;
  &lt;password&gt;password&lt;/password&gt;
 &lt;/User&gt;
&lt;/Users&gt;
</code></pre>
<p>If your using C#, the following example code can be used to read the<br />
results of the query and create a DOM object.</p>
<pre><code>using (SqlConnection connection = new SqlConnection(sConnectString))
{
    connection.Open();
    using (SqlCommand command = connection.CreateCommand())
    {
        DateTime startTime = DateTime.Now;
        command.CommandText = sSqlQuery ;
        command.Parameters.Add("@USERNAME", SqlDbType.VarChar, 32) ;
        command.Prepare();
        command.Parameters["@USERNAME"].Value = sUsername ;
        using (XmlReader reader = command.ExecuteXmlReader())
        {
            XmlDocument dom = new XmlDocument();
            dom.Load(reader);
            /* ... */
        }
    }
}
</code></pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mentaljetsam.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mentaljetsam.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mentaljetsam.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mentaljetsam.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mentaljetsam.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mentaljetsam.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mentaljetsam.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mentaljetsam.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mentaljetsam.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mentaljetsam.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=94&subd=mentaljetsam&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mentaljetsam.wordpress.com/2009/04/05/c-sql-server-result-in-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0d9bedc8c8efa836677a93972746d36d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pcfinch</media:title>
		</media:content>
	</item>
		<item>
		<title>Firefox HTTPS error ssl_error_rx_record_too_long</title>
		<link>http://mentaljetsam.wordpress.com/2009/03/11/firefox-https-error-ssl_error_rx_record_too_long/</link>
		<comments>http://mentaljetsam.wordpress.com/2009/03/11/firefox-https-error-ssl_error_rx_record_too_long/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 02:58:07 +0000</pubDate>
		<dc:creator>pcfinch</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://mentaljetsam.wordpress.com/?p=90</guid>
		<description><![CDATA[I just had an interesting problem when accessing a HTTPS (SSL) service in Firefox. I got the following error message.
SSL received a record that exceeded the maximum permissible length.
(Error code: ssl_error_rx_record_too_long)
It turned out the the HTTPS service (on port 443) was not actually a HTTPS service and it was configured as a normal HTTP service. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=90&subd=mentaljetsam&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I just had an interesting problem when accessing a HTTPS (SSL) service in Firefox. I got the following error message.</p>
<pre><code>SSL received a record that exceeded the maximum permissible length.
(Error code: ssl_error_rx_record_too_long)</code></pre>
<p>It turned out the the HTTPS service (on port 443) was not actually a HTTPS service and it was configured as a normal HTTP service. The initial connection from the browser was communicating in HTTPS, and expecting a security certificate, but instead it was getting back the normal HTTP &#8220;Bad Request&#8221; HTML. A confusing error message, but an easy problem to fix.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mentaljetsam.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mentaljetsam.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mentaljetsam.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mentaljetsam.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mentaljetsam.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mentaljetsam.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mentaljetsam.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mentaljetsam.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mentaljetsam.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mentaljetsam.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=90&subd=mentaljetsam&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mentaljetsam.wordpress.com/2009/03/11/firefox-https-error-ssl_error_rx_record_too_long/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0d9bedc8c8efa836677a93972746d36d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pcfinch</media:title>
		</media:content>
	</item>
		<item>
		<title>Internet Explorer does not open application/rtf mimetype</title>
		<link>http://mentaljetsam.wordpress.com/2009/02/05/internet-explorer-does-not-open-applicationrtf-mimetype/</link>
		<comments>http://mentaljetsam.wordpress.com/2009/02/05/internet-explorer-does-not-open-applicationrtf-mimetype/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 00:09:59 +0000</pubDate>
		<dc:creator>pcfinch</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://mentaljetsam.wordpress.com/?p=74</guid>
		<description><![CDATA[I had an odd problem lately where Internet Explorer (IE 7 &#38; 8 ) stopped opening RTF documents served up by our website. The RTF files were served up by a CGI, so they did not have a &#8220;rtf&#8221; extension on the URL. IE would present a dialog saying that it did not know what [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=74&subd=mentaljetsam&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><div id="attachment_81" class="wp-caption alignright" style="width: 310px"><img src="http://mentaljetsam.files.wordpress.com/2009/02/unknown_file_type_message2.png?w=300&#038;h=202" alt="Unknown File Type Dialog" title="unknown_file_type_message2" width="300" height="202" class="size-medium wp-image-81" /><p class="wp-caption-text">Unknown File Type Dialog</p></div>
<p>I had an odd problem lately where Internet Explorer (IE 7 &amp; 8 ) stopped opening RTF documents served up by our website. The RTF files were served up by a CGI, so they did not have a &#8220;rtf&#8221; extension on the URL. IE would present a dialog saying that it did not know what the file type was &#8220;Unknown File Type&#8221;. All the other browsers (Firefox, Safari, etc) worked fine.</p>
<p>On further investigation I found the server was responding with a mime-type of &#8220;application/rtf&#8221; and it seems IE no longer knows what this is and expects a mime-type of &#8220;application/msword&#8221;. I found 2 solutions.</p>
<ol>
<li>The best solution, if you control the server, is to change the mime-type of the documents to &#8220;application/msword&#8221; ().</li>
<li>If you can not change the server, then try adding the following registry entry to define the &#8220;application/rtf&#8221; mime-type
<p>
<code>
<pre>[HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/rtf]
"Extension"=".rtf"</pre>
<p></code></p>
</li>
</ol>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mentaljetsam.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mentaljetsam.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mentaljetsam.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mentaljetsam.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mentaljetsam.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mentaljetsam.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mentaljetsam.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mentaljetsam.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mentaljetsam.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mentaljetsam.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=74&subd=mentaljetsam&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mentaljetsam.wordpress.com/2009/02/05/internet-explorer-does-not-open-applicationrtf-mimetype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0d9bedc8c8efa836677a93972746d36d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pcfinch</media:title>
		</media:content>

		<media:content url="http://mentaljetsam.files.wordpress.com/2009/02/unknown_file_type_message2.png?w=300" medium="image">
			<media:title type="html">unknown_file_type_message2</media:title>
		</media:content>
	</item>
		<item>
		<title>Sorting an array in C#</title>
		<link>http://mentaljetsam.wordpress.com/2009/01/14/sorting-an-array-in-c/</link>
		<comments>http://mentaljetsam.wordpress.com/2009/01/14/sorting-an-array-in-c/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 00:14:59 +0000</pubDate>
		<dc:creator>pcfinch</dc:creator>
				<category><![CDATA[C#.NET]]></category>

		<guid isPermaLink="false">http://mentaljetsam.wordpress.com/?p=69</guid>
		<description><![CDATA[The following code is a simple and quick way to sort and arbitrary array of objects in C#. I like using a delegate in this way as you can pick any attribute or member of the object to sort on at the time you need to perform the sort in the code.
class Customer {
	internal String [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=69&subd=mentaljetsam&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The following code is a simple and quick way to sort and arbitrary array of objects in C#. I like using a delegate in this way as you can pick any attribute or member of the object to sort on at the time you need to perform the sort in the code.</p>
<pre><code>class Customer {
	internal String sName ;
	internal String sAddress ;
} ;

Customer[] customers = new Customer[20] ;
/* Load array ...*/

Array.Sort&lt;Customer&gt;(customers, new Comparison&lt;Customer&gt;(delegate(Customer l, Customer r)
{
	return (l.sName.CompareTo(r.sName));
})) ;</code></pre>
<p>Make sure the array is full, i.e. no null entries, otherwise you will have to check for null values in l and r. </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mentaljetsam.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mentaljetsam.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mentaljetsam.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mentaljetsam.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mentaljetsam.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mentaljetsam.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mentaljetsam.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mentaljetsam.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mentaljetsam.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mentaljetsam.wordpress.com/69/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=69&subd=mentaljetsam&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mentaljetsam.wordpress.com/2009/01/14/sorting-an-array-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0d9bedc8c8efa836677a93972746d36d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pcfinch</media:title>
		</media:content>
	</item>
		<item>
		<title>Dynamically creating C# class instances using reflection.</title>
		<link>http://mentaljetsam.wordpress.com/2008/11/27/dynamically-creating-c-classes-using-reflection/</link>
		<comments>http://mentaljetsam.wordpress.com/2008/11/27/dynamically-creating-c-classes-using-reflection/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 00:48:31 +0000</pubDate>
		<dc:creator>pcfinch</dc:creator>
				<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://mentaljetsam.wordpress.com/?p=66</guid>
		<description><![CDATA[Reflection, the ability for a program to dynamically inspect itself, is possibly one of the most powerful features of modern programming languages like C# and Java. The following is a simple example of how to interrogate the current C# assembly, locate all the classes that are derived from a base class, and then dynamically created [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=66&subd=mentaljetsam&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Reflection, the ability for a program to dynamically inspect itself, is possibly one of the most powerful features of modern programming languages like C# and Java. The following is a simple example of how to interrogate the current C# assembly, locate all the classes that are derived from a base class, and then dynamically created and executed an instance of the class.</p>
<p>I wrote this code for a set of tests I wanted to implement. The idea was to make it simple to add new tests to the project by just adding new class derived from the base &#8220;Test&#8221; class. The program would then automatically find all the tests and run them.</p>
<ol>
<li>First, create the “Test” base class.<br />
<code>
<pre>abstract class Test {
  protected String m_sName ;
  public String name { get { return (m_sName) ; } }
  protected Test(String sName) { m_sName = sName; }
  abstract public void run() ;
}</pre>
<p></code></li>
<li>Derive the actual tests from the &#8220;Test&#8221; base class.<br />
<code>
<pre>class UsersTest : Test {
  public UsersTest() : base(&quot;Test user names and passwords&quot;) { }
  override public void run() {
    // Test code does here
  }
}</pre>
<p></code></li>
<li>To run the tests, first get the current Assembly, and find all the Types that are &#8220;Classes&#8221; and are derived from the class &#8220;Test&#8221;. Once you have the type you need to Dynamically create and instance of it. This method looks for the default constructor (the one with no parameters) and uses that, however, the code could look for any constructor if required. It then calls the contractor to<br />
create an instance of the class, and finally executes the classes run() method.<br />
<code>
<pre>Assembly asm = Assembly.GetExecutingAssembly();
foreach (Type type in asm.GetTypes()) {
  if (type.IsSubclassOf(typeof(Test)) &amp;&amp; type.IsClass) {
    ConstructorInfo ci = type.GetConstructor(new Type[] { });
    Test t = (Test)ci.Invoke(new Object[] { }) ;
    Console.Out.WriteLine (&quot;Running Test - &quot; + t.name);
    t.run();
  }
}</pre>
<p></code></li>
</ol>
<p>This is a very simple example, and there are other ways to runs tests, but it is easy to see how this design could be extended and used in all sorts of situations.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mentaljetsam.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mentaljetsam.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mentaljetsam.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mentaljetsam.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mentaljetsam.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mentaljetsam.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mentaljetsam.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mentaljetsam.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mentaljetsam.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mentaljetsam.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=66&subd=mentaljetsam&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mentaljetsam.wordpress.com/2008/11/27/dynamically-creating-c-classes-using-reflection/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0d9bedc8c8efa836677a93972746d36d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pcfinch</media:title>
		</media:content>
	</item>
		<item>
		<title>Loading an SqlDataReader into a DataGridView</title>
		<link>http://mentaljetsam.wordpress.com/2008/11/20/loading-an-sqldatareader-into-a-datagridview/</link>
		<comments>http://mentaljetsam.wordpress.com/2008/11/20/loading-an-sqldatareader-into-a-datagridview/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 00:29:08 +0000</pubDate>
		<dc:creator>pcfinch</dc:creator>
				<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://mentaljetsam.wordpress.com/?p=59</guid>
		<description><![CDATA[This is a simple example of how to load the results from an arbitrary SQL Query, contained in a SqlDataReader, into a DataGridView on a Windows Form (C# Client application). This is an example of a customised view and not an automatically generated one using the AutoGenerateColumns feature and it also demonstrates calling a SQL [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=59&subd=mentaljetsam&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is a simple example of how to load the results from an arbitrary SQL Query, contained in a SqlDataReader, into a DataGridView on a Windows Form (C# Client application). This is an example of a customised view and not an automatically generated one using the AutoGenerateColumns feature and it also demonstrates calling a SQL Server Stored Procedure from C#.</p>
<ol>
<li>Create the DataGridView object e.g. dgvTrials</li>
<li>Add the Column names to the DataGridView using Visual Studio. For each of the columns set the DataPropertyName to the column name returned in the SQL query result set. <br /><a href="http://mentaljetsam.files.wordpress.com/2008/11/addcolumnstogrid2.png"><img src="http://mentaljetsam.files.wordpress.com/2008/11/addcolumnstogrid2.png?w=128&#038;h=92" alt="Add Column to DataGridView" title="Add Column to DataGridView" width="128" height="92"></a></li>
<li>Create the SQL Server stored procedure.
<pre><code>IF OBJECT_ID('sys.sp_getTrialsByUser') IS NOT NULL
 DROP PROCEDURE [sys].sp_getTrialsByUser
GO
CREATE PROCEDURE [sys].sp_getTrialsByUser (@username varchar(50)) AS
select distinct TRIAL_ID, START_DATE, END_DATE, BOOKACRONYM
    from [sys].TRIALS t
	where t.USERNAME = @username ;</code></pre>
</li>
<li>Code up the SQL Query using a SqlConnection, SqlCommand and SqlDataReader and load the SqlDataReader results into a DataTable. Then bind the DataTable to the DataGridView.
<pre><code>using (SqlConnection connection = new SqlConnection(sConnectString))
{
  connection.Open();
  using (SqlCommand command = connection.CreateCommand())
  {
    command.CommandText = &quot;[sys].sp_getTrialsByUser&quot;;
    command.CommandType = CommandType.StoredProcedure;
    command.Parameters.Add(&quot;@USERNAME&quot;, SqlDbType.VarChar, 50);
    command.Prepare();
    command.Parameters[&quot;@USERNAME&quot;].Value = tbUserName.Text;
    SqlDataReader reader = command.ExecuteReader();
    using (reader)
    {
      DataTable table = new DataTable();
      table.Load(reader);
      dgvTrials.DataSource = table;
    }
  }
}</code></pre>
</li>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mentaljetsam.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mentaljetsam.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mentaljetsam.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mentaljetsam.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mentaljetsam.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mentaljetsam.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mentaljetsam.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mentaljetsam.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mentaljetsam.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mentaljetsam.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=59&subd=mentaljetsam&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mentaljetsam.wordpress.com/2008/11/20/loading-an-sqldatareader-into-a-datagridview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0d9bedc8c8efa836677a93972746d36d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pcfinch</media:title>
		</media:content>

		<media:content url="http://mentaljetsam.files.wordpress.com/2008/11/addcolumnstogrid2.png?w=128" medium="image">
			<media:title type="html">Add Column to DataGridView</media:title>
		</media:content>
	</item>
		<item>
		<title>Create nested SqlCommands on a single SqlConnection in C#</title>
		<link>http://mentaljetsam.wordpress.com/2008/11/17/create-nested-sqlcommands-on-a-single-sqlconnection-in-c/</link>
		<comments>http://mentaljetsam.wordpress.com/2008/11/17/create-nested-sqlcommands-on-a-single-sqlconnection-in-c/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 03:47:26 +0000</pubDate>
		<dc:creator>pcfinch</dc:creator>
				<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://mentaljetsam.wordpress.com/?p=57</guid>
		<description><![CDATA[When trying to create multiple SqlCommand Objects on a single SqlConnection I got the following error.
There is already an open DataReader associated with this Command which must be closed first.
I was trying to use an SqlDataReader, from the first SqlCommand, and use the data in the records in that reader to perform another query by [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=57&subd=mentaljetsam&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When trying to create multiple SqlCommand Objects on a single SqlConnection I got the following error.</p>
<blockquote><p>There is already an open DataReader associated with this Command which must be closed first.</p></blockquote>
<p>I was trying to use an SqlDataReader, from the first SqlCommand, and use the data in the records in that reader to perform another query by creating another [nested] SqlCommand object while the first reader was still running. After a little research the solution is very simple. Just add &#8220;MultipleActiveResultSets=True&#8221; to the connection string.</p>
<blockquote><p>Data Source=server\PORTAL;Initial Catalog=mydb;User ID=user;Password=password;MultipleActiveResultSets=True</p></blockquote>
<p>Warning&#8230; Don&#8217;t forget to Close() the inner SqlDataReader and Dispose() of the SqlCommand otherwise you may quickly run out of resources, or better still use the &#8220;using(&#8230;) { &#8230; }&#8221; statement. e.g.</p>
<pre><code>using (SqlConnection connection = new SqlConnection(sConnectionString))
{
  connection.Open();
  using (SqlCommand command = connection.CreateCommand())
  {
    command.CommandText = @&quot;
      select USERNAME from USERS where GROUP = @GID&quot;;
    command.Parameters.Add(&quot;@GID&quot;, SqlDbType.Int);
    command.Prepare();
    command.Parameters[&quot;@GID&quot;].Value = nGroupId;
    using (SqlDataReader reader = command.ExecuteReader())
    {
      while (reader.Read())
      {
        String sUsername = reader.GetString(0); // USERNAME
        // ...
      }
    }
  }
}
</pre>
<p></code></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mentaljetsam.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mentaljetsam.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mentaljetsam.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mentaljetsam.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mentaljetsam.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mentaljetsam.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mentaljetsam.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mentaljetsam.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mentaljetsam.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mentaljetsam.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=57&subd=mentaljetsam&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mentaljetsam.wordpress.com/2008/11/17/create-nested-sqlcommands-on-a-single-sqlconnection-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0d9bedc8c8efa836677a93972746d36d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pcfinch</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple IP/Hostname based security for C# web services.</title>
		<link>http://mentaljetsam.wordpress.com/2008/11/10/simple-iphostname-based-security-for-web-services/</link>
		<comments>http://mentaljetsam.wordpress.com/2008/11/10/simple-iphostname-based-security-for-web-services/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 22:19:21 +0000</pubDate>
		<dc:creator>pcfinch</dc:creator>
				<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://mentaljetsam.wordpress.com/?p=51</guid>
		<description><![CDATA[The following code implements a simple IP / Hostname based security for a web service. If you need to restrict access to a C# web services there are a number of methods and the common one is to pass a username and password in the request. This works great until the username and password get [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=51&subd=mentaljetsam&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The following code implements a simple IP / Hostname based security for a web service. If you need to restrict access to a C# web services there are a number of methods and the common one is to pass a username and password in the request. This works great until the username and password get “out in the wild” and then you have to change everything. Another common method is to use the web server serurity, but then the application does not have control.</p>
<p>The method described here just gets the incoming IP address of the client, for the web service, and then looks the IP address and / or the hostname up in the <code>&lt;appSettings&gt;</code> section on the <code>web.config</code> file. If the IP address or hostname is defined in the file, then the client is allowed access the service otherwise an error message can be returned. </p>
<pre><code>using System.Configuration;
using System.Net; 

[WebMethod(Description = &quot;Get the server date and time&quot;)]
public string GetDateTime()
{
  String sResponse = CheckClientAccess(HttpContext.Current.Request.UserHostAddress) ;
  if (String.IsNullOrEmpty(sResponse))
    sResponse = DateTime.Now.ToString();
  return (sResponse);
}

/// &lt;summary&gt;
/// Return empty string if access is granted otherwise return a error message.
/// &lt;/summary&gt;
public String CheckClientAccess(String sClientIpAddress)
{
  String sResult = String.Empty;
  String sAccess = ConfigurationManager.AppSettings[&quot;ACCESS-&quot; + sClientIpAddress];
  if (String.IsNullOrEmpty(sAccess) || (!sAccess.Equals(&quot;allow&quot;, StringComparison.OrdinalIgnoreCase)))
  {
    IPHostEntry host = Dns.GetHostEntry(sClientIpAddress);
    if ((host != null) &amp;&amp; (!String.IsNullOrEmpty(host.HostName)))
    {
      String sHostname = host.HostName.ToLower();
      sAccess = ConfigurationManager.AppSettings[&quot;ACCESS-&quot; + sHostname];
      if (String.IsNullOrEmpty(sAccess) || (!sAccess.Equals(&quot;allow&quot;, StringComparison.OrdinalIgnoreCase)))
        sResult = String.Format(&quot;Access from {0} \&quot;{1}\&quot;  denied&quot;, sClientIpAddress, sHostname) ;
    }
    else
      sResult  = String.Format(&quot;Access from {0} denied&quot;, sClientIpAddress) ;
  }
  return (sResult);
}
</code></pre>
<p>The settings in the web.config file are as follows.</p>
<pre><code>&lt;appSettings&gt;
  &lt;add key=&quot;ACCESS-127.0.0.1&quot; value=&quot;allow&quot;/&gt;
  &lt;add key=&quot;ACCESS-server23.domain.int&quot; value=&quot;allow&quot;/&gt;
&lt;/appSettings&gt;
</code></pre>
<p>This is not a perfect solution, and is not recommend for high security systems, but it’s simple to implement and pretty safe if you trust the incoming computers IP addresses and host names.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mentaljetsam.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mentaljetsam.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mentaljetsam.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mentaljetsam.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mentaljetsam.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mentaljetsam.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mentaljetsam.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mentaljetsam.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mentaljetsam.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mentaljetsam.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mentaljetsam.wordpress.com&blog=934235&post=51&subd=mentaljetsam&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mentaljetsam.wordpress.com/2008/11/10/simple-iphostname-based-security-for-web-services/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0d9bedc8c8efa836677a93972746d36d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pcfinch</media:title>
		</media:content>
	</item>
	</channel>
</rss>