  

<?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>Ross Pickett</title>
	<atom:link href="http://rossp.com.au/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://rossp.com.au</link>
	<description>My Blog</description>
	<lastBuildDate>Tue, 26 May 2015 15:58:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.22</generator>
	<item>
		<title>Meaningful LINQ</title>
		<link>http://rossp.com.au/?p=192</link>
		<comments>http://rossp.com.au/?p=192#comments</comments>
		<pubDate>Tue, 26 May 2015 15:42:39 +0000</pubDate>
		<dc:creator><![CDATA[rossp]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://rossp.com.au/?p=192</guid>
		<description><![CDATA[Let&#8217;s say you want to query a data source by combining a bunch of .Where() clauses together, no big deal. // This represents your base data call, // perhaps from a repository. IQueryable&#60;T&#62; data = GetStuff&#60;T&#62;(); // Now we want to only pick out the things we want. var exclusive = data.Where(x =&#62; x.AccessLevel &#62; <br /><a class="read-more" href="http://rossp.com.au/?p=192">Read More</a>]]></description>
				<content:encoded><![CDATA[<p>Let&#8217;s say you want to query a data source by combining a bunch of <code>.Where<T>()</code> clauses together, no big deal.</p>
<pre class="prettyprint linenums"><code class="language-javascript">// This represents your base data call, 
// perhaps from a repository.
IQueryable&lt;T&gt; data = GetStuff&lt;T&gt;();

// Now we want to only pick out the things we want.
var exclusive = data.Where(x =&gt; x.AccessLevel &gt; 2 &amp;&amp; 
   x.IsValid &amp;&amp; 
   x.Something != 5 &amp;&amp; 
   x.SomethingElse &gt; 2);</code></pre>
<p>Now perhaps what this is doing (the above convoluted <code>Where</code> clause) is actually reused a lot throughout your system. Let&#8217;s assume that is so, for the sake of the rest of this post, and also that it is the logic for granting access to something, thus giving us and future programmers some contextual meaning.</p>
<p>If the above properties are common across all the types that inherit or implement <code>T</code>, then we can easily create a little extension method to make this much neater.</p>
<pre class="prettyprint linenums"><code class="language-javascript">public static class ext{
	public static IQueryable&lt;T&gt; HasAccess&lt;T&gt;(this IQueryable&lt;T&gt; query) 
           where T : CommonThing {
	   return query.Where(x =&gt; x.AccessLevel &gt; 2 &amp;&amp; 
              x.IsValid &amp;&amp; 
              x.Something != 5 &amp;&amp; 
              x.SomethingElse &gt; 2);
	}
}

// Now we can, for all T types, do the very simple, meaningful 
// and hard-to-screw-up:
var exclusive = data.HasAccess();
</code></pre>
<p>So, there we have a small example to just wrap a convoluted IQueryable method into a simple reusable one that has an obvious meaning.<br />
Big deal?<br />
Ok, what if not everything can so simply inherit from <code>T</code>?<br />
In relational systems you often get at least a little complexity (or a lot!) of nested entities/tables when trying to relate all of those <code>T</code> things back to whatever we&#8217;re trying to grant <code>T</code> access to (these complexities are usually due to the system trying to mimic real life). At this point we can&#8217;t say those things inherit from <code>T</code> anymore.</p>
<p>Take the allegory of a Person, a Key, and a Car. It&#8217;s natural think of a Person and a Key that both could both have access to a given Car, but the Person technically needs the Key to actually gain access.<br />
Only the Key, in this example, is actually directly linked to a Car (via a foreign key in a table perhaps).<br />
But throughout our code we want to use a function like <code>.HasAccess()</code> if we can, for both the Key and the Person because that makes sense, it could also provide a hint at the least, or a constraint at the most for how Person and Key can be used in the system.<br />
Ok, so to do this let&#8217;s draw up a few simple classes to make the code clear.</p>
<pre class="prettyprint linenums"><code class="language-javascript">class Key {
   string KeyCode { get;set; }
}
class Car {
   string KeyCode { get;set; } 
}
class Person {
   Key Key { get;set; }
}</code></pre>
<p>So, with this example and scenario we have a thing we want access to (a Car), and we know how to gain access (with the matching KeyCode from the right Key &#8211; but the requirements could be anything of course).<br />
Therefore we can have an extension method like the below, without having a common-class constraint on <code>T</code>:</p>
<pre class="prettyprint linenums"><code class="language-javascript">public static IQueryable&lt;T&gt; HasAccessToCar&lt;T&gt;(this IQueryable&lt;T&gt; query, 
   Car car, 
   Expression&lt;Func&lt;T, string&gt;&gt; keyCode) {
      // ...
}
</code></pre>
<p>I will fill in the meat of this function, but first the <code>keyCode</code> parameter requires explanation, especially as it differs from the first param &#8211; a plain old <code>Car</code> type.<br />
The fact that it&#8217;s an <code>Expression<></code> signifies that we can hopefully use this method without triggering any LINQ &#8211; SQL execution prematurely. Indeed one of the cares that should be taken in the world of LINQ is not to accidentally convert our IQueryables to some other kind of (enumerable) type and therefore cause the SQL to execute.<br />
(Part of what we&#8217;re trying to do here still is to just build up the relevant <code>.Where()</code> clauses on our IQueryable expression before it ends up being executed &#8211; this is important in situations where you have a potential large amount of data you&#8217;re dealing with, you don&#8217;t want to pull back more than you really want).<br />
The important part here is that it&#8217;s asking for an expression to <em>explain</em> how to get a keycode string from <code>T</code>. If we know the keycode, then we can easily do a compare of it with the <code>Car</code>&#8216;s code, and thus grant or deny access. Therefore the method itself (unlike our initial simple example) doesn&#8217;t need to know anything about the <code>T</code> type.</p>
<p>Now, because the <code>car</code> parameter is just a <code>Car</code>, it means that we obviously need an instance of one first. There&#8217;s an assumption in the design of this function that you already have one, and you&#8217;re going to use this function to find out what other <code>T</code> things can be viewed/listed in relation to the <code>car</code>. (In real world applications, the Car concept would be replaced by some overarching thing that you often want to see data listed against).<br />
Ok, how to use this extension:</p>
<pre class="prettyprint linenums"><code class="language-javascript">// Get the Car from somewhere
var aCar = new Car(...);

// All keys and persons retrieved from somewhere
IQueryable&lt;Key&gt; keys = getKeys();
IQueryable&lt;Person&gt; people = getPeople();

// Limit our access with the same function for 
// different generic T types.
IQueryable&lt;Key&gt; keysWithAccess = 
   keys.HasAccessToCar(aCar, x =&gt; x.KeyCode);
IQueryable&lt;Person&gt; peopleWithAccess = 
    people.HasAccessToCar(aCar, x =&gt; x.Key.KeyCode);
</code></pre>
<p>So, we have achieved a structured way to filter stuff by whether it has access to a <code>Car</code> or not (as long as it can be linked up to a <code>Key</code> instance&#8217;s KeyCode somehow via an expression), and the generic <code>T</code> type can be anything. Cool :).</p>
<p>Now back to the last thing, how do we take an <code>Expression<</code><code>Func<</code><code>T, string</code><code>></code></code><code>></code> type and apply that to an existing <code>IQueryable<T></code> ?</p>
<pre class="prettyprint linenums"><code class="language-javascript">public static IQueryable&lt;T&gt; HasAccessToCar&lt;T&gt;(this IQueryable&lt;T&gt; query, 
   Car car, 
   Expression&lt;Func&lt;T, string&gt;&gt; keyCode) {
      
      var codeConst = Expression.Constant(car.KeyCode, typeof(string));

      // This will generate an expression predicate 
      // that will do an equality comparison between the car's
      // KeyCode and what the supplied keyCode would give us.
      Expression&lt;Func&lt;T, bool&gt;&gt; hasAccess = 
         Expression.Lambda&lt;Func&lt;T, bool&gt;&gt;(
            Expression.Equal(keyCode.Body, codeConst),
            keyCode.Parameters);

      // Finally just do this.
      return query.Where(hasAccess);
}
</code></pre>
<p>So, at the end of the day, what we've done could be called business logic, where it would not be unusual to have verbose descriptive meaningful function names (like I've tried to have here) . Although these extension methods could just be ordinary methods placed at your DAL/repository level (or whatever you want to call it) should you wish to implement it like that. </p>
<p>However this idea is implemented, the trick is in the dynamic expression building. It is because of this that we can maintain our unexecuted expression tree and also create meaningful function names without upsetting the LINQ-SQL conversion. </p>
]]></content:encoded>
			<wfw:commentRss>http://rossp.com.au/?feed=rss2&#038;p=192</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Async WebAPI Timeouts</title>
		<link>http://rossp.com.au/?p=175</link>
		<comments>http://rossp.com.au/?p=175#comments</comments>
		<pubDate>Tue, 14 Oct 2014 11:07:41 +0000</pubDate>
		<dc:creator><![CDATA[rossp]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://rossp.com.au/?p=175</guid>
		<description><![CDATA[Have you noticed that .net&#8217;s MVC framework allows you to handle async action timeouts easily? AsyncTimeoutAttribute But the older (I think) WebAPI does not have such a nice way of handling this. Here&#8217;s a bit of code to enable it: public abstract class BaseController : ApiController { protected async Task&#60;T&#62; TimeoutAsyncTask&#60;T&#62;(Func&#60;T&#62; task, Func&#60;T&#62; timeOutTask, int <br /><a class="read-more" href="http://rossp.com.au/?p=175">Read More</a>]]></description>
				<content:encoded><![CDATA[<p>Have you noticed that .net&#8217;s MVC framework allows you to handle async action timeouts easily?<br />
<a href="http://msdn.microsoft.com/en-us/library/system.web.mvc.asynctimeoutattribute(v=vs.118).aspx" title="AsyncTimeoutAttribute" target="_blank">AsyncTimeoutAttribute</a><br />
But the older (I think) WebAPI does not have such a nice way of handling this.<br />
Here&#8217;s a bit of code to enable it:</p>
<pre class="prettyprint linenums"><code class="language-javascript">public abstract class BaseController : ApiController {
    protected async Task&lt;T&gt; TimeoutAsyncTask&lt;T&gt;(Func&lt;T&gt; task, Func&lt;T&gt; timeOutTask, int timeoutMilliseconds) 
    {
        Task timeout = TimeoutTask(timeoutMilliseconds);
        T result = default(T);
        CancellationTokenSource cts = new CancellationTokenSource();
        HttpContext current = HttpContext.Current; //preserve context
        Task real = Task.Run(() =&gt; {
            HttpContext.Current = current;
            result = task.Invoke();
        }, cts.Token);
        Task finishedTask = await Task.WhenAny(timeout, real); 
        if (finishedTask == timeout){
            //timeout 
            HttpContext.Current = current;
            cts.Cancel();
            result = timeOutTask.Invoke();
        }
        return result;
    }

    private async Task TimeoutTask(int timeoutValue)
    {
        await Task.Delay(timeoutValue);
    }
}
</code></pre>
<p>So, to use this you could create a controller based from this (or just take the methods), and then call <code>TimeoutAsyncTask(..)</code> supplying two lambda functions to run. The first being the thing that you expect may take some time, and the 2nd being the callback function to run should the quantity of milliseconds pass before your <code>task</code> is complete. Either way, this async function will wait until either the supplied task is finished, or the timeout occurs (if called with <code>await</code> of course).</p>
]]></content:encoded>
			<wfw:commentRss>http://rossp.com.au/?feed=rss2&#038;p=175</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Anonymous Dictionary</title>
		<link>http://rossp.com.au/?p=164</link>
		<comments>http://rossp.com.au/?p=164#comments</comments>
		<pubDate>Sat, 31 May 2014 08:35:05 +0000</pubDate>
		<dc:creator><![CDATA[rossp]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://rossp.com.au/?p=164</guid>
		<description><![CDATA[A lot of the MVC.net built in helpers use anonymously-typed parameters for routes and html attributes. If, say, you wanted to create your own helpers that might affect the html and you also wanted to keep an optional htmlAttributes anon parameter, then you&#8217;d possible want to combine these somehow. A three-liner to convert an anonymous <br /><a class="read-more" href="http://rossp.com.au/?p=164">Read More</a>]]></description>
				<content:encoded><![CDATA[<p>A lot of the MVC.net built in helpers use anonymously-typed parameters for routes and html attributes.<br />
If, say, you wanted to create your own helpers that might affect the html and you also wanted to keep an optional htmlAttributes anon parameter, then you&#8217;d possible want to combine these somehow.<br />
A three-liner to convert an anonymous object to a manageable Dictionary:</p>
<pre class="prettyprint linenums"><code class="language-java">var anon = new { ymous="yep", class="ok" };
Dictionary&lt;string, object&gt; dictionary = new Dictionary&lt;string, object&gt;();
anon.GetType().GetProperties().ToList().ForEach(x =&gt; dictionary.Add(x.Name, x.GetValue(anon)));
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://rossp.com.au/?feed=rss2&#038;p=164</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Base64 Url Tokens in Javascript</title>
		<link>http://rossp.com.au/?p=127</link>
		<comments>http://rossp.com.au/?p=127#comments</comments>
		<pubDate>Mon, 28 Apr 2014 11:30:49 +0000</pubDate>
		<dc:creator><![CDATA[rossp]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://rossp.com.au/?p=127</guid>
		<description><![CDATA[This is great if you want to encode some unicode to Base64 in javascript: http://www.webtoolkit.info/javascript-base64.html But you cannot use the result reliably as part of a url, should you wish to do so. In .net you have HttpServerUtility.UrlTokenEncode which just does a base64 and then swaps out certain characters so you can. Here are two <br /><a class="read-more" href="http://rossp.com.au/?p=127">Read More</a>]]></description>
				<content:encoded><![CDATA[<p>This is great if you want to encode some unicode to Base64 in javascript:</p>
<p><a href="http://www.webtoolkit.info/javascript-base64.html" title="http://www.webtoolkit.info/javascript-base64.html" target="_blank">http://www.webtoolkit.info/javascript-base64.html</a></p>
<p>But you cannot use the result reliably as part of a url, should you wish to do so.<br />
In .net you have</p>
<pre>HttpServerUtility.UrlTokenEncode</pre>
<p>which just does a base64 and then swaps out certain characters so you can.<br />
Here are two small mods to the above javascript to do the same:</p>
<pre class="prettyprint linenums"><code class="language-javascript">encodeUrlToken: function (input) {
    var ret = Base64.encode(input).replace(/\+/g, "-").replace(/\//g, "_");
    if (ret.length == 0)
        return "";
    var noPadding = ret.replace(/=+$/, ""); 
    return noPadding + (ret.length - noPadding.length).toString();
},

decodeUrlToken: function (input) {
    var ec = parseInt(input.substring(input.length - 1));
    var temp = input.replace(/\-/g, "+").replace(/\_/g, "/");
    temp = temp.substring(0, temp.length - 1); 
    return Base64.decode(temp + "===".substring(0, ec));
},
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://rossp.com.au/?feed=rss2&#038;p=127</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GeoJSON</title>
		<link>http://rossp.com.au/?p=114</link>
		<comments>http://rossp.com.au/?p=114#comments</comments>
		<pubDate>Sat, 05 Apr 2014 09:55:06 +0000</pubDate>
		<dc:creator><![CDATA[rossp]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[JSON]]></category>

		<guid isPermaLink="false">http://rossp.com.au/?p=114</guid>
		<description><![CDATA[This service is very handy.]]></description>
				<content:encoded><![CDATA[<p><a href="http://api.geonames.org/search?username=demo&#038;featureClass=A&#038;featureCode=ADM1&#038;type=json" title="http://api.geonames.org/search?username=demo&#038;featureClass=A&#038;featureCode=ADM1&#038;type=json" target="_blank"></a><br />
This service is very handy.</p>
]]></content:encoded>
			<wfw:commentRss>http://rossp.com.au/?feed=rss2&#038;p=114</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Domain optional</title>
		<link>http://rossp.com.au/?p=101</link>
		<comments>http://rossp.com.au/?p=101#comments</comments>
		<pubDate>Tue, 25 Feb 2014 00:13:16 +0000</pubDate>
		<dc:creator><![CDATA[rossp]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cookies]]></category>

		<guid isPermaLink="false">http://rossp.com.au/?p=101</guid>
		<description><![CDATA[RFC 2109: HTTP State Management Mechanism, D. Kristol, L. Montulli, Feb 1997]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.ietf.org/rfc/rfc2109.txt" title="RFC 2109: HTTP State Management Mechanism, D. Kristol, L. Montulli, Feb 1997" target="_blank">RFC 2109: HTTP State Management Mechanism, D. Kristol, L. Montulli, Feb 1997</a></p>
]]></content:encoded>
			<wfw:commentRss>http://rossp.com.au/?feed=rss2&#038;p=101</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On the fly minifier</title>
		<link>http://rossp.com.au/?p=81</link>
		<comments>http://rossp.com.au/?p=81#comments</comments>
		<pubDate>Sat, 22 Feb 2014 16:53:03 +0000</pubDate>
		<dc:creator><![CDATA[rossp]]></dc:creator>
				<category><![CDATA[asp.net]]></category>

		<guid isPermaLink="false">http://rossp.com.au/?p=81</guid>
		<description><![CDATA[If you ever wanted to minify your code but not wanted to manage an uncompressed version also, then something like this will help. Assuming you&#8217;re working in asp.net then you can use the YuiCompressor (yuicompressor.codeplex.com) on the fly via a Handler. public class YuiCompressor : IHttpHandler { private readonly TimeSpan _cacheDuration = TimeSpan.FromHours(12); private const <br /><a class="read-more" href="http://rossp.com.au/?p=81">Read More</a>]]></description>
				<content:encoded><![CDATA[<p>If you ever wanted to minify your code but not wanted to manage an uncompressed version also, then something like this will help.<br />
Assuming you&#8217;re working in asp.net then you can use the YuiCompressor (<a href="http://yuicompressor.codeplex.com/" title="yuicompressor.codeplex.com" target="_blank">yuicompressor.codeplex.com</a>) on the fly via a Handler.</p>
<pre class="prettyprint linenums"><code class="language-java">public class YuiCompressor : IHttpHandler
{
    private readonly TimeSpan _cacheDuration = TimeSpan.FromHours(12); 
    private const string CSS = ".css";
    private const string JS = ".js";

    public class YuiCompressorCache
    { 
        public YuiCompressorCache(string data, string contentType, int code)
        {
            Data = data;
            ContentType = contentType;
            Code = code;
        }
        public string Data { get; set; }
        public string ContentType { get; set; }
        public int Code { get; set; }
    }

    public YuiCompressor(){ }


    public void ProcessRequest(HttpContext context)
    {  
        context.Response.ContentEncoding = System.Text.Encoding.Default;         
        string raw = context.Request.RawUrl.ToLower();
        writeCompressedFile(context, raw);
    }

    public bool IsReusable
    {
        get
        {
            return true;
        }
    }

    private void writeCompressedFile(HttpContext context, string rawUrl)
    { 
        string cn = "YuiCompressor_" + rawUrl;
        YuiCompressorCache ycc = (YuiCompressorCache)context.Cache[cn];
        if (ycc == null)
        {
            string filePath = context.Server.MapPath(rawUrl);
            string output = string.Empty;
            string contentType = "text/plan";
            int responseCode = 200;
            CacheDependency cd = null;
            try
            {
                output = File.ReadAllText(filePath);
                cd = new CacheDependency(filePath);
                if (rawUrl.IndexOf(CSS, 0, StringComparison.CurrentCultureIgnoreCase) == rawUrl.Length - CSS.Length)
                {
                    CssCompressor cssc = new CssCompressor();
                    output = cssc.Compress(output) + Environment.NewLine;
                    contentType = "text/css";
                }
                else if (rawUrl.IndexOf(JS, 0, StringComparison.CurrentCultureIgnoreCase) == rawUrl.Length - JS.Length)
                {
                    JavaScriptCompressor jsc = new JavaScriptCompressor();
                    output = jsc.Compress(output) + Environment.NewLine;
                    contentType = "application/x-javascript";
                }
                else
                {
                    throw new Exception("Bad Extension");
                }
                //successfully compressed 
            }
            catch (System.IO.FileNotFoundException fnfe) //iis prevents this anyway
            {
                responseCode = 404;
                contentType = "text/html";
                output = string.Empty; 
            }
            catch (EcmaScript.NET.EcmaScriptRuntimeException esre)
            {
                //failure to deal with compression, output plain text
                contentType = "text/plain";   
            } 
            finally
            {
                ycc = new YuiCompressorCache(output, contentType, responseCode);

                Random r = new Random();
                context.Cache.Insert(cn, ycc, cd, Cache.NoAbsoluteExpiration, _cacheDuration.Add(TimeSpan.FromMinutes(r.Next(10)))); 
                //so it doesn't happen all at once
            }
        }
        context.Response.StatusCode = ycc.Code;
        context.Response.ContentType = ycc.ContentType;
        context.Response.Write(ycc.Data); 
    }
}</code></pre>
<p>The above code will load each .js or .css file as it is requested and parse it through the compiler before it returns the compressed string, but not before it is cached for next use.<br />
Should it fail to compress something, it will respond with the original content.<br />
For this to work you also need to add this to your webconfig:</p>
<pre class="prettyprint linenums">&lt;handlers&gt;
  &lt;add name="YuiCompressorJS" verb="*" path="*.js" type="YuiCompressor" /&gt;
  &lt;add name="YuiCompressorCSS" verb="*" path="*.css" type="YuiCompressor" /&gt;
&lt;/handlers&gt;</pre>
<p>Care should be taken with the &#8216;path&#8217; parameters of these handlers as anything that passes through this will end up stored in memory as cache.</p>
<p>Edit:<br />
<a href="http://blogs.msdn.com/b/rickandy/archive/2012/08/14/adding-bundling-and-minification-to-web-forms.aspx" title="http://blogs.msdn.com/b/rickandy/archive/2012/08/14/adding-bundling-and-minification-to-web-forms.aspx" target="_blank">http://blogs.msdn.com/b/rickandy/archive/2012/08/14/adding-bundling-and-minification-to-web-forms.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://rossp.com.au/?feed=rss2&#038;p=81</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solid State Pasta</title>
		<link>http://rossp.com.au/?p=41</link>
		<comments>http://rossp.com.au/?p=41#comments</comments>
		<pubDate>Sat, 18 Jan 2014 10:11:14 +0000</pubDate>
		<dc:creator><![CDATA[rossp]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://rossp.com.au/?p=41</guid>
		<description><![CDATA[]]></description>
				<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://rossp.com.au/?feed=rss2&#038;p=41</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My blog site</title>
		<link>http://rossp.com.au/?p=11</link>
		<comments>http://rossp.com.au/?p=11#comments</comments>
		<pubDate>Sat, 11 Jan 2014 17:08:58 +0000</pubDate>
		<dc:creator><![CDATA[rossp]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://rossp.com.au/?p=11</guid>
		<description><![CDATA[To whom it may concern, I&#8217;ve just set up my new blog; learnt how wordpress works; and everything that goes along with it. This is what that looks like.]]></description>
				<content:encoded><![CDATA[<p>To whom it may concern, I&#8217;ve just set up my new blog; learnt how wordpress works; and everything that goes along with it.</p>
<p>This is what that looks like.</p>
]]></content:encoded>
			<wfw:commentRss>http://rossp.com.au/?feed=rss2&#038;p=11</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
