<?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>Shawson&#039;s Code Blog &#187; XML</title>
	<atom:link href="http://www.shawson.co.uk/codeblog/category/xml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shawson.co.uk/codeblog</link>
	<description>development notes for my failing memory</description>
	<lastBuildDate>Mon, 26 Jul 2010 19:08:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Syndicating to RSS using the built in .net SyndicationFeed classes</title>
		<link>http://www.shawson.co.uk/codeblog/syndicating-to-rss-using-the-build-in-net-syndicationfeed-classes/</link>
		<comments>http://www.shawson.co.uk/codeblog/syndicating-to-rss-using-the-build-in-net-syndicationfeed-classes/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 11:31:20 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[C#.net]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[extension methods]]></category>
		<category><![CDATA[generic list]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[syndication]]></category>

		<guid isPermaLink="false">http://www.shawson.co.uk/codeblog/?p=314</guid>
		<description><![CDATA[My boss recently showed me a pretty handy bunch of classes for generating RSS and ATOM feeds, all built into dot net.
Start by adding a new reference to your project; System.Services.Web.
The SyndicationFeed class holds all the data about your feed and lets you spit everything out in a number of different formats (RSS2.0, ATOM1.0)- each [...]


Related posts:<ul><li><a href='http://www.shawson.co.uk/codeblog/asp-net-aspx-pages-posting-back-to-the-wrong-url-when-using-server-rewrite/' rel='bookmark' title='Permanent Link: ASP.net aspx pages posting back to the wrong URL when using Server Rewrite'>ASP.net aspx pages posting back to the wrong URL when using Server Rewrite</a></li>
<li><a href='http://www.shawson.co.uk/codeblog/rss-xslt/' rel='bookmark' title='Permanent Link: RSS XSLT'>RSS XSLT</a></li>
<li><a href='http://www.shawson.co.uk/codeblog/creating-a-re-usable-shopping-basket-with-generics-in-c-sharp/' rel='bookmark' title='Permanent Link: Creating a re-usable shopping basket with Generics in C#'>Creating a re-usable shopping basket with Generics in C#</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>My boss recently showed me a pretty handy bunch of classes for generating RSS and ATOM feeds, all built into dot net.</p>
<p>Start by adding a new reference to your project; System.Services.Web.</p>
<p>The SyndicationFeed class holds all the data about your feed and lets you spit everything out in a number of different formats (RSS2.0, ATOM1.0)- each item in the feed is held in a generic list of SyndicationItem objects.  As I work for a publishers, I was creating an RSS feed of coming soon books so I added an extension method to my book class- ToSyndicationItem();</p>
<pre class="brush: csharp">
public static SyndicationItem ToSyndicationItem(this Book book)
{
    return new SyndicationItem(book.CoverTitle + &quot; &quot; + book.Subtitle, book.Description, new Uri(book.GetURL()))
    {
        Summary = new TextSyndicationContent(book.DescriptionShort, TextSyndicationContentKind.Plaintext),
        Id = book.Id.ToString(),
        LastUpdatedTime = book.InsertedDate
    };
}
</pre>
<p>This allows me to use all the standard select methods I already in my book class, to also populate my RSS feed.  So to create the feed all I need do in my RSS.ashx handler file is;</p>
<pre class="brush: csharp">
List&lt;Book&gt; books = Book.GetBookPublishedBetween(DateTime.Now,DateTime.Now.AddDays( int.Parse( GroupConstants.ComingSoonMaxDays)));
List&lt;SyndicationItem&gt; syndicationItems = new List&lt;SyndicationItem&gt;();
foreach (Book book in books)
    syndicationItems.Add(book.ToSyndicationItem());

feed = new SyndicationFeed(syndicationItems)
{
    Title = new TextSyndicationContent(&quot;Coming Soon Titles&quot;),
    Description = new TextSyndicationContent(&quot;Forthcoming publications.&quot;),
    BaseUri = new Uri(LinkHelper.GetBaseUrl())
};

var output = new StringWriter();
var writer = new XmlTextWriter(output);

new Rss20FeedFormatter(feed).WriteTo(writer);

context.Response.ContentType = &quot;application/rss+xml&quot;;
context.Response.Write(output.ToString());
</pre>


<p>Related posts:<ul><li><a href='http://www.shawson.co.uk/codeblog/asp-net-aspx-pages-posting-back-to-the-wrong-url-when-using-server-rewrite/' rel='bookmark' title='Permanent Link: ASP.net aspx pages posting back to the wrong URL when using Server Rewrite'>ASP.net aspx pages posting back to the wrong URL when using Server Rewrite</a></li>
<li><a href='http://www.shawson.co.uk/codeblog/rss-xslt/' rel='bookmark' title='Permanent Link: RSS XSLT'>RSS XSLT</a></li>
<li><a href='http://www.shawson.co.uk/codeblog/creating-a-re-usable-shopping-basket-with-generics-in-c-sharp/' rel='bookmark' title='Permanent Link: Creating a re-usable shopping basket with Generics in C#'>Creating a re-usable shopping basket with Generics in C#</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.shawson.co.uk/codeblog/syndicating-to-rss-using-the-build-in-net-syndicationfeed-classes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RSS XSLT</title>
		<link>http://www.shawson.co.uk/codeblog/rss-xslt/</link>
		<comments>http://www.shawson.co.uk/codeblog/rss-xslt/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 10:08:09 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[XML]]></category>
		<category><![CDATA[XPath]]></category>

		<guid isPermaLink="false">http://www.shawson.co.uk/codeblog/?p=309</guid>
		<description><![CDATA[Simple piece of XSL to format an RSS Feed;

&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62;
&#60;xsl:stylesheet version=&#34;1.0&#34; xmlns:xsl=&#34;http://www.w3.org/1999/XSL/Transform&#34;&#62;
 &#60;xsl:output method=&#34;html&#34;&#62;&#60;/xsl:output&#62;
    &#60;xsl:template match=&#34;rss/channel/item&#34;&#62;
    &#60;li&#62;
      &#60;a href=&#34;{link}&#34; title=&#34;{title}&#34;&#62;
        &#60;xsl:value-of select=&#34;title&#34; /&#62;
      &#60;/a&#62;
      &#60;p&#62;
  [...]


Related posts:<ul><li><a href='http://www.shawson.co.uk/codeblog/consuming-rss-feeds-using-asp-net-controls/' rel='bookmark' title='Permanent Link: Consuming RSS Feeds using ASP.net controls'>Consuming RSS Feeds using ASP.net controls</a></li>
<li><a href='http://www.shawson.co.uk/codeblog/syndicating-to-rss-using-the-build-in-net-syndicationfeed-classes/' rel='bookmark' title='Permanent Link: Syndicating to RSS using the built in .net SyndicationFeed classes'>Syndicating to RSS using the built in .net SyndicationFeed classes</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>Simple piece of XSL to format an RSS Feed;</p>
<pre class="brush: html">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
 &lt;xsl:output method=&quot;html&quot;&gt;&lt;/xsl:output&gt;
    &lt;xsl:template match=&quot;rss/channel/item&quot;&gt;
    &lt;li&gt;
      &lt;a href=&quot;{link}&quot; title=&quot;{title}&quot;&gt;
        &lt;xsl:value-of select=&quot;title&quot; /&gt;
      &lt;/a&gt;
      &lt;p&gt;
        &lt;xsl:value-of select=&quot;description&quot; /&gt;
      &lt;/p&gt;
    &lt;/li&gt;
  &lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;
</pre>


<p>Related posts:<ul><li><a href='http://www.shawson.co.uk/codeblog/consuming-rss-feeds-using-asp-net-controls/' rel='bookmark' title='Permanent Link: Consuming RSS Feeds using ASP.net controls'>Consuming RSS Feeds using ASP.net controls</a></li>
<li><a href='http://www.shawson.co.uk/codeblog/syndicating-to-rss-using-the-build-in-net-syndicationfeed-classes/' rel='bookmark' title='Permanent Link: Syndicating to RSS using the built in .net SyndicationFeed classes'>Syndicating to RSS using the built in .net SyndicationFeed classes</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.shawson.co.uk/codeblog/rss-xslt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Consuming RSS Feeds using ASP.net controls</title>
		<link>http://www.shawson.co.uk/codeblog/consuming-rss-feeds-using-asp-net-controls/</link>
		<comments>http://www.shawson.co.uk/codeblog/consuming-rss-feeds-using-asp-net-controls/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 15:20:04 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XPath]]></category>

		<guid isPermaLink="false">http://www.shawson.co.uk/codeblog/?p=302</guid>
		<description><![CDATA[Real simple example, using an XmlDataSource and my new super best friend, the ListView control;

    &#60;asp:ListView ID=&#34;RSSList&#34; runat=&#34;server&#34; DataSourceID=&#34;RSSData&#34;&#62;
        &#60;LayoutTemplate&#62;
            &#60;ul&#62;
              [...]


Related posts:<ul><li><a href='http://www.shawson.co.uk/codeblog/aspnet-nested-listview-controls-with-all-edit-functionality-working/' rel='bookmark' title='Permanent Link: Asp.net nested ListView control&#8217;s, with edit functionality- example'>Asp.net nested ListView control&#8217;s, with edit functionality- example</a></li>
<li><a href='http://www.shawson.co.uk/codeblog/how-to-display-hierarchical-data-by-using-nested-repeater-controls-and-visual-c-net/' rel='bookmark' title='Permanent Link: How To Display Hierarchical Data Using Nested Repeater Controls and Visual C# .NET'>How To Display Hierarchical Data Using Nested Repeater Controls and Visual C# .NET</a></li>
<li><a href='http://www.shawson.co.uk/codeblog/using-findcontrol-to-find-a-repeater-nested-inside-a-repeater-with-headertemplate-or-footertemplate-defined/' rel='bookmark' title='Permanent Link: Using FindControl to find a repeater nested inside a repeater with HeaderTemplate or FooterTemplate defined'>Using FindControl to find a repeater nested inside a repeater with HeaderTemplate or FooterTemplate defined</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>Real simple example, using an XmlDataSource and my new super best friend, the ListView control;</p>
<pre class="brush: html">
    &lt;asp:ListView ID=&quot;RSSList&quot; runat=&quot;server&quot; DataSourceID=&quot;RSSData&quot;&gt;
        &lt;LayoutTemplate&gt;
            &lt;ul&gt;
                &lt;li id=&quot;itemPlaceholder&quot; runat=&quot;server&quot; /&gt;
            &lt;/ul&gt;
        &lt;/LayoutTemplate&gt;
        &lt;ItemTemplate&gt;
            &lt;li&gt;&lt;h2&gt;
                &lt;%#XPath(&quot;title&quot;) %&gt;
            &lt;/h2&gt;

            &lt;%#XPath(&quot;author&quot;) %&gt;
            &lt;a href=&#039;&lt;%#XPath(&quot;link&quot;) %&gt;&#039; title=&#039;&#039;&gt;View Original Post&lt;/a&gt;
            &lt;/li&gt;
        &lt;/ItemTemplate&gt;
    &lt;/asp:ListView&gt;
    &lt;asp:XmlDataSource
        ID=&quot;RSSData&quot;
        runat=&quot;server&quot;
        DataFile=&quot;http://www.shawson.co.uk/codeblog/feed/&quot;
        XPath=&quot;rss/channel/item&quot;&gt;
    &lt;/asp:XmlDataSource&gt;
</pre>


<p>Related posts:<ul><li><a href='http://www.shawson.co.uk/codeblog/aspnet-nested-listview-controls-with-all-edit-functionality-working/' rel='bookmark' title='Permanent Link: Asp.net nested ListView control&#8217;s, with edit functionality- example'>Asp.net nested ListView control&#8217;s, with edit functionality- example</a></li>
<li><a href='http://www.shawson.co.uk/codeblog/how-to-display-hierarchical-data-by-using-nested-repeater-controls-and-visual-c-net/' rel='bookmark' title='Permanent Link: How To Display Hierarchical Data Using Nested Repeater Controls and Visual C# .NET'>How To Display Hierarchical Data Using Nested Repeater Controls and Visual C# .NET</a></li>
<li><a href='http://www.shawson.co.uk/codeblog/using-findcontrol-to-find-a-repeater-nested-inside-a-repeater-with-headertemplate-or-footertemplate-defined/' rel='bookmark' title='Permanent Link: Using FindControl to find a repeater nested inside a repeater with HeaderTemplate or FooterTemplate defined'>Using FindControl to find a repeater nested inside a repeater with HeaderTemplate or FooterTemplate defined</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.shawson.co.uk/codeblog/consuming-rss-feeds-using-asp-net-controls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visually build XPath using &#8220;Sketch Path&#8221;</title>
		<link>http://www.shawson.co.uk/codeblog/visually-build-xpath-using-sketch-path/</link>
		<comments>http://www.shawson.co.uk/codeblog/visually-build-xpath-using-sketch-path/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 10:59:44 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[Web Services]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XPath]]></category>

		<guid isPermaLink="false">http://www.shawson.co.uk/codeblog/?p=202</guid>
		<description><![CDATA[Paul found an awesome tool fopr visually parsing XML files and building XPath statements, called Sketch Path available for download here


Related posts:Consuming RSS Feeds using ASP.net controls
Web Services Debugging with Fiddler 2
Making your WCF Service compatible with legacy .net 1.1 applications



Related posts:<ul><li><a href='http://www.shawson.co.uk/codeblog/consuming-rss-feeds-using-asp-net-controls/' rel='bookmark' title='Permanent Link: Consuming RSS Feeds using ASP.net controls'>Consuming RSS Feeds using ASP.net controls</a></li>
<li><a href='http://www.shawson.co.uk/codeblog/web-services-debugging-with-fiddler-2/' rel='bookmark' title='Permanent Link: Web Services Debugging with Fiddler 2'>Web Services Debugging with Fiddler 2</a></li>
<li><a href='http://www.shawson.co.uk/codeblog/making-your-wcf-service-compatible-with-legacy-net-1-1-applications/' rel='bookmark' title='Permanent Link: Making your WCF Service compatible with legacy .net 1.1 applications'>Making your WCF Service compatible with legacy .net 1.1 applications</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>Paul found an awesome tool fopr visually parsing XML files and building XPath statements, called <a href="http://pgfearo.googlepages.com/home" target="_blank">Sketch Path available for download here</a></p>


<p>Related posts:<ul><li><a href='http://www.shawson.co.uk/codeblog/consuming-rss-feeds-using-asp-net-controls/' rel='bookmark' title='Permanent Link: Consuming RSS Feeds using ASP.net controls'>Consuming RSS Feeds using ASP.net controls</a></li>
<li><a href='http://www.shawson.co.uk/codeblog/web-services-debugging-with-fiddler-2/' rel='bookmark' title='Permanent Link: Web Services Debugging with Fiddler 2'>Web Services Debugging with Fiddler 2</a></li>
<li><a href='http://www.shawson.co.uk/codeblog/making-your-wcf-service-compatible-with-legacy-net-1-1-applications/' rel='bookmark' title='Permanent Link: Making your WCF Service compatible with legacy .net 1.1 applications'>Making your WCF Service compatible with legacy .net 1.1 applications</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.shawson.co.uk/codeblog/visually-build-xpath-using-sketch-path/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick XML serialisation of an object..</title>
		<link>http://www.shawson.co.uk/codeblog/quick-xml-serialisation-of-an-object/</link>
		<comments>http://www.shawson.co.uk/codeblog/quick-xml-serialisation-of-an-object/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 13:16:03 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[C#.net]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.shawson.co.uk/codeblog/?p=197</guid>
		<description><![CDATA[Quick code snippet for taking a serialisable object, serialising to XMl then spitting out a string for you to write out to a debug log or something- i used this for spitting back the responses I was getting from a web service call i was making

          [...]


Related posts:<ul><li><a href='http://www.shawson.co.uk/codeblog/syndicating-to-rss-using-the-build-in-net-syndicationfeed-classes/' rel='bookmark' title='Permanent Link: Syndicating to RSS using the built in .net SyndicationFeed classes'>Syndicating to RSS using the built in .net SyndicationFeed classes</a></li>
<li><a href='http://www.shawson.co.uk/codeblog/a-complete-list-of-net-serializers-in-3-5/' rel='bookmark' title='Permanent Link: A complete list of .NET Serializers in 3.5'>A complete list of .NET Serializers in 3.5</a></li>
<li><a href='http://www.shawson.co.uk/codeblog/web-services-debugging-with-fiddler-2/' rel='bookmark' title='Permanent Link: Web Services Debugging with Fiddler 2'>Web Services Debugging with Fiddler 2</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>Quick code snippet for taking a serialisable object, serialising to XMl then spitting out a string for you to write out to a debug log or something- i used this for spitting back the responses I was getting from a web service call i was making</p>
<pre class="brush: csharp">
            StringBuilder sb_xml = new StringBuilder();
            XmlSerializer s = new XmlSerializer( typeof( Hachette.Checkout.Vista.Stock.ProductStockLiteResultResponse ) );
            StringWriter w = new StringWriter(sb_xml);
            s.Serialize(w, ws_response);
            w.Close();
            Response.Write(&quot;&lt;!-- Response = &quot; + sb_xml + &quot; --&gt;&quot;);
</pre>


<p>Related posts:<ul><li><a href='http://www.shawson.co.uk/codeblog/syndicating-to-rss-using-the-build-in-net-syndicationfeed-classes/' rel='bookmark' title='Permanent Link: Syndicating to RSS using the built in .net SyndicationFeed classes'>Syndicating to RSS using the built in .net SyndicationFeed classes</a></li>
<li><a href='http://www.shawson.co.uk/codeblog/a-complete-list-of-net-serializers-in-3-5/' rel='bookmark' title='Permanent Link: A complete list of .NET Serializers in 3.5'>A complete list of .NET Serializers in 3.5</a></li>
<li><a href='http://www.shawson.co.uk/codeblog/web-services-debugging-with-fiddler-2/' rel='bookmark' title='Permanent Link: Web Services Debugging with Fiddler 2'>Web Services Debugging with Fiddler 2</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.shawson.co.uk/codeblog/quick-xml-serialisation-of-an-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
