<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>Microformats</title><link>http://weblog.vb-tech.com/nick/category/16.aspx</link><description>Microformats</description><managingEditor>Nick</managingEditor><dc:language>en-US</dc:language><generator>.Text Version 0.95.2004.102</generator><item><dc:creator>Nick</dc:creator><title>If you are reading this...</title><link>http://weblog.vb-tech.com/nick/archive/2007/03/20/2283.aspx</link><pubDate>Tue, 20 Mar 2007 21:47:00 GMT</pubDate><guid>http://weblog.vb-tech.com/nick/archive/2007/03/20/2283.aspx</guid><wfw:comment>http://weblog.vb-tech.com/nick/comments/2283.aspx</wfw:comment><comments>http://weblog.vb-tech.com/nick/archive/2007/03/20/2283.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://weblog.vb-tech.com/nick/comments/commentRss/2283.aspx</wfw:commentRss><trackback:ping>http://weblog.vb-tech.com/nick/services/trackbacks/2283.aspx</trackback:ping><description>&lt;P&gt;Then you are missing out on content on my new blog!&lt;/P&gt;
&lt;P&gt;The new blog url is:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://sharepointnick.com/blog/default.aspx"&gt;http://sharepointnick.com/blog/default.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;And the new RSS feed you need to subscribe to is:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://feeds.feedburner.com/sharepointnick"&gt;http://feeds.feedburner.com/sharepointnick&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;See you on the other side!&lt;/P&gt;&lt;img src ="http://weblog.vb-tech.com/nick/aggbug/2283.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Nick</dc:creator><title>SharePointNick.com</title><link>http://weblog.vb-tech.com/nick/archive/2007/03/09/2253.aspx</link><pubDate>Fri, 09 Mar 2007 20:55:00 GMT</pubDate><guid>http://weblog.vb-tech.com/nick/archive/2007/03/09/2253.aspx</guid><wfw:comment>http://weblog.vb-tech.com/nick/comments/2253.aspx</wfw:comment><comments>http://weblog.vb-tech.com/nick/archive/2007/03/09/2253.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://weblog.vb-tech.com/nick/comments/commentRss/2253.aspx</wfw:commentRss><trackback:ping>http://weblog.vb-tech.com/nick/services/trackbacks/2253.aspx</trackback:ping><description>&lt;p&gt;&lt;a href="http://www.sharepointnick.com"&gt;www.sharepointnick.com&lt;/a&gt;&lt;/p&gt; &lt;p&gt;This will be the new site very soon!&lt;/p&gt; &lt;p&gt;Make sure you are using the feedburner RSS feed and the move will be painless for you! Here it is:&lt;/p&gt; &lt;p&gt;&lt;a title="http://feeds.feedburner.com/Vb-techWeblog" href="http://feeds.feedburner.com/Vb-techWeblog"&gt;http://feeds.feedburner.com/Vb-techWeblog&lt;/a&gt;&lt;/p&gt; &lt;p&gt;There's some 600 people that aren't using this so you better all update it now!&lt;/p&gt;&lt;img src ="http://weblog.vb-tech.com/nick/aggbug/2253.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Nick</dc:creator><title>Laptop stolen</title><link>http://weblog.vb-tech.com/nick/archive/2006/12/14/2000.aspx</link><pubDate>Thu, 14 Dec 2006 22:15:00 GMT</pubDate><guid>http://weblog.vb-tech.com/nick/archive/2006/12/14/2000.aspx</guid><wfw:comment>http://weblog.vb-tech.com/nick/comments/2000.aspx</wfw:comment><comments>http://weblog.vb-tech.com/nick/archive/2006/12/14/2000.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://weblog.vb-tech.com/nick/comments/commentRss/2000.aspx</wfw:commentRss><trackback:ping>http://weblog.vb-tech.com/nick/services/trackbacks/2000.aspx</trackback:ping><description>&lt;P&gt;unfortunately I had my laptop stolen tonight.&lt;/P&gt;
&lt;P&gt;If anybody see's any dodgy posts i apologies.&lt;/P&gt;&lt;img src ="http://weblog.vb-tech.com/nick/aggbug/2000.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Nick</dc:creator><title>Fun parsing microformats out of html</title><link>http://weblog.vb-tech.com/nick/archive/2006/04/08/1521.aspx</link><pubDate>Sat, 08 Apr 2006 21:15:00 GMT</pubDate><guid>http://weblog.vb-tech.com/nick/archive/2006/04/08/1521.aspx</guid><wfw:comment>http://weblog.vb-tech.com/nick/comments/1521.aspx</wfw:comment><comments>http://weblog.vb-tech.com/nick/archive/2006/04/08/1521.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://weblog.vb-tech.com/nick/comments/commentRss/1521.aspx</wfw:commentRss><trackback:ping>http://weblog.vb-tech.com/nick/services/trackbacks/1521.aspx</trackback:ping><description>&lt;P&gt;I&amp;#8217;ve been having great fun, and varying success, over the past could of days with parsing &lt;A href="http://microformats.org/" target=_blank&gt;microformats&lt;/A&gt; out of html. Initially I thought that using regular expressions would be the way forward, but with only a little exprience of writing these I knew it was going to be a struggle. I&amp;#8217;m using the following code to grab the html from open instances of Internet Explorer instances:&lt;/P&gt;&lt;PRE&gt;&lt;FONT size=2&gt;SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindows();
foreach ( object window in shellWindows )
{
 SHDocVw.InternetExplorer t = window as SHDocVw.InternetExplorer;
 IEInstance = window as SHDocVw.InternetExplorer;
 if (IEInstance != null)
 {
  HTMLDocument doc = IEInstance.Document as HTMLDocument;
  if (doc != null)
  {
   string h = doc.documentElement.innerHTML;
  }
 }
}&lt;/FONT&gt;
&lt;/PRE&gt;
&lt;P&gt;The string variable h then contains the html code for each browser instance. I found the most amazing library the other day by Simon Mourier which he&amp;#8217;s called &lt;A href="http://blogs.msdn.com/smourier/archive/2003/06/04/8265.aspx" target=_blank&gt;.NET Html Agility Pack&lt;/A&gt;. It enables you to take mal formed html and turns it into xHtml. &amp;#8216;Big deal&amp;#8217; you may say, and I&amp;#8217;ll bloody well tell you it is because it now allows you to work with the html document as an xml document, being able to query it with xPath. Fantastic, especially&amp;nbsp;when the microformat team have been nice enough to give you the &lt;A href="http://microformats.org/wiki/implementation-guidelines" target=_blank&gt;xPath query&lt;/A&gt; to pull our microformats as well!&lt;/P&gt;
&lt;P&gt;I&amp;#8217;ve come across a couple of problems though, both with grabing the html using the above code, and Html Agility Pack. There are the following hevents on the microformat site:&lt;/P&gt;
&amp;lt;ol id=&amp;quot;events-list&amp;quot;&amp;gt;&lt;br&gt;
&amp;lt;li class=&amp;quot;vevent&amp;quot;&amp;gt;&lt;br&gt;
&amp;lt;a class=&amp;quot;url summary&amp;quot; href=&amp;quot;http://xtech.org/&amp;quot;&amp;gt;XTech&amp;lt;/a&amp;gt;&lt;br&gt;
&amp;lt;div&amp;gt;&lt;br&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;2006-05-16&amp;quot;&amp;gt;May 16&amp;lt;/abbr&amp;gt; - &amp;lt;abbr class=&amp;quot;dtend&amp;quot; title=&amp;quot;2006-05-19&amp;quot;&amp;gt;19&amp;lt;/abbr&amp;gt;, 2006&lt;br&gt;
&amp;lt;div class=&amp;quot;location&amp;quot;&amp;gt;Amsterdam, Netherlands&amp;lt;/div&amp;gt;&lt;br&gt;
&amp;lt;/div&amp;gt;&lt;br&gt;
&amp;lt;/li&amp;gt;&lt;br&gt;
&amp;lt;li class=&amp;quot;vevent&amp;quot;&amp;gt;&lt;br&gt;
&amp;lt;a class=&amp;quot;url summary&amp;quot; href=&amp;quot;http://www2006.org/&amp;quot;&amp;gt;WWW 2006&amp;lt;/a&amp;gt;&lt;br&gt;
&amp;lt;div&amp;gt;&lt;br&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;2006-05-23&amp;quot;&amp;gt;May 23&amp;lt;/abbr&amp;gt; - &amp;lt;abbr class=&amp;quot;dtend&amp;quot; title=&amp;quot;2006-05-26&amp;quot;&amp;gt;26&amp;lt;/abbr&amp;gt;, 2006&lt;br&gt;
&amp;lt;div class=&amp;quot;location&amp;quot;&amp;gt;Edinburgh, Scotland&amp;lt;/div&amp;gt;&lt;br&gt;
&amp;lt;/div&amp;gt;&lt;br&gt;
&amp;lt;/li&amp;gt;&lt;br&gt;
&amp;lt;li class=&amp;quot;vevent&amp;quot;&amp;gt;&lt;br&gt;
&amp;lt;a class=&amp;quot;url summary&amp;quot; href=&amp;quot;http://www.vivabit.com/atmedia2006/&amp;quot;&amp;gt;@media&amp;lt;/a&amp;gt;&lt;br&gt;
&amp;lt;div&amp;gt;&lt;br&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;2006-06-15&amp;quot;&amp;gt;June 15&amp;lt;/abbr&amp;gt; - &amp;lt;abbr class=&amp;quot;dtend&amp;quot; title=&amp;quot;2006-06-17&amp;quot;&amp;gt;26&amp;lt;/abbr&amp;gt;, 2006&lt;br&gt;
&amp;lt;div class=&amp;quot;location&amp;quot;&amp;gt;London, UK&amp;lt;/div&amp;gt;&lt;br&gt;
&amp;lt;/div&amp;gt;&lt;br&gt;
&amp;lt;/li&amp;gt;&lt;br&gt;
&amp;lt;/ol&amp;gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Using the above .NET code above to grab the html code however returns the above events lists, but the html code is missing the closing tags. That&amp;#8217;s all cool as Html Agility Pack should be able to fix it, but unfortunately it takes the mal formed html and turns it into this xHtml:&lt;/P&gt;
&amp;lt;ol id=&amp;quot;events-list&amp;quot;&amp;gt;&lt;br&gt;
&amp;lt;li class=&amp;quot;vevent&amp;quot;&amp;gt;&lt;br&gt;
&amp;lt;a class=&amp;quot;url summary&amp;quot; href=&amp;quot;http://xtech.org/&amp;quot;&amp;gt;XTech&amp;lt;/a&amp;gt;&lt;br&gt;
&amp;lt;div&amp;gt;&lt;br&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;2006-05-16&amp;quot;&amp;gt;May 16&amp;lt;/abbr&amp;gt; - &amp;lt;abbr class=&amp;quot;dtend&amp;quot; title=&amp;quot;2006-05-19&amp;quot;&amp;gt;19&amp;lt;/abbr&amp;gt;, 2006&lt;br&gt;
&amp;lt;div class=&amp;quot;location&amp;quot;&amp;gt;Amsterdam, Netherlands&amp;lt;/div&amp;gt;&lt;br&gt;
&amp;lt;/div&amp;gt;&lt;br&gt;
&amp;lt;li class=&amp;quot;vevent&amp;quot;&amp;gt;&lt;br&gt;
&amp;lt;a class=&amp;quot;url summary&amp;quot; href=&amp;quot;http://www2006.org/&amp;quot;&amp;gt;WWW 2006&amp;lt;/a&amp;gt;&lt;br&gt;
&amp;lt;div&amp;gt;&lt;br&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;2006-05-23&amp;quot;&amp;gt;May 23&amp;lt;/abbr&amp;gt; - &amp;lt;abbr class=&amp;quot;dtend&amp;quot; title=&amp;quot;2006-05-26&amp;quot;&amp;gt;26&amp;lt;/abbr&amp;gt;, 2006&lt;br&gt;
&amp;lt;div class=&amp;quot;location&amp;quot;&amp;gt;Edinburgh, Scotland&amp;lt;/div&amp;gt;&lt;br&gt;
&amp;lt;/div&amp;gt;&lt;br&gt;
&amp;lt;li class=&amp;quot;vevent&amp;quot;&amp;gt;&lt;br&gt;
&amp;lt;a class=&amp;quot;url summary&amp;quot; href=&amp;quot;http://www.vivabit.com/atmedia2006/&amp;quot;&amp;gt;@media&amp;lt;/a&amp;gt;&lt;br&gt;
&amp;lt;div&amp;gt;&lt;br&gt;
&amp;lt;abbr class=&amp;quot;dtstart&amp;quot; title=&amp;quot;2006-06-15&amp;quot;&amp;gt;June 15&amp;lt;/abbr&amp;gt; - &amp;lt;abbr class=&amp;quot;dtend&amp;quot; title=&amp;quot;2006-06-17&amp;quot;&amp;gt;26&amp;lt;/abbr&amp;gt;, 2006&lt;br&gt;
&amp;lt;div class=&amp;quot;location&amp;quot;&amp;gt;London, UK&amp;lt;/div&amp;gt;&lt;br&gt;
&amp;lt;/div&amp;gt;&lt;br&gt;
&amp;lt;/li&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/li&amp;gt;&lt;br&gt;
&amp;lt;/ol&amp;gt;&lt;P&gt;You can see all the closing 
&amp;lt;/li&amp;gt;&amp;#8217;s lumped together at the end. When you run the xPath query over this it returns the events as one big event. DOH! 
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;So it looks like I have the following options, find out why string html = doc.documentElement.innerHTML; is returning the html with missing &amp;#8217;s or try and fix Html Agility Pack so it inserts &amp;#8217;s back into the correct place. Or the final option is to write a replace regular expression that takes the intially returned mal formed html and fix it.&lt;/P&gt;
&lt;P&gt;Tags : &lt;A href="http://www.technorati.com/tag/microformats" rel=tag&gt;microformats&lt;/A&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;img src ="http://weblog.vb-tech.com/nick/aggbug/1521.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Nick</dc:creator><title>Live Clipboard mailing list</title><link>http://weblog.vb-tech.com/nick/archive/2006/04/06/1518.aspx</link><pubDate>Thu, 06 Apr 2006 09:02:00 GMT</pubDate><guid>http://weblog.vb-tech.com/nick/archive/2006/04/06/1518.aspx</guid><wfw:comment>http://weblog.vb-tech.com/nick/comments/1518.aspx</wfw:comment><comments>http://weblog.vb-tech.com/nick/archive/2006/04/06/1518.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://weblog.vb-tech.com/nick/comments/commentRss/1518.aspx</wfw:commentRss><trackback:ping>http://weblog.vb-tech.com/nick/services/trackbacks/1518.aspx</trackback:ping><description>has anybody had any success signing up for the &lt;A href="http://spaces.msn.com/editorial/rayozzie/demo/liveclip/liveclipsample/clipboardexample.html"&gt;live clipboard&lt;/A&gt; &lt;A href="http://discuss.microsoft.com/SCRIPTS/WA-MSD.EXE?SUBED1=live-clip&amp;amp;A=1"&gt;mailing list&lt;/A&gt;? I put my details in and it says some email&amp;nbsp;will be on its way but I've been waiting for 2 days now!&lt;img src ="http://weblog.vb-tech.com/nick/aggbug/1518.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Nick</dc:creator><title>Microformats</title><link>http://weblog.vb-tech.com/nick/archive/2006/04/03/1516.aspx</link><pubDate>Mon, 03 Apr 2006 23:12:00 GMT</pubDate><guid>http://weblog.vb-tech.com/nick/archive/2006/04/03/1516.aspx</guid><wfw:comment>http://weblog.vb-tech.com/nick/comments/1516.aspx</wfw:comment><comments>http://weblog.vb-tech.com/nick/archive/2006/04/03/1516.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://weblog.vb-tech.com/nick/comments/commentRss/1516.aspx</wfw:commentRss><trackback:ping>http://weblog.vb-tech.com/nick/services/trackbacks/1516.aspx</trackback:ping><description>&lt;P&gt;I listened to Alex Barnetts &lt;A href="http://blogs.msdn.com/alexbarn/archive/2006/03/31/566361.aspx" target=_blank&gt;podcast&lt;/A&gt; today about &lt;A href="http://www.microformats.org/" target=_blank&gt;microformats&lt;/A&gt; today and really enjoyed it. I&amp;#8217;d not really looked into the microformat idea until Marc Canters session he organised at Mix06 and even then left wondering what the big fuss was all about. Trying to get people to agree on standards in a community sounded like a breeding ground for arguments to me, but so far they seem to be doing a pretty good job. I thought I got what microformats were, but they just didn&amp;#8217;t seem complicated enough to me for everyone to get excited about. But then I suppose many great things never are ie RSS, OPML etc&amp;#8230;&lt;/P&gt;
&lt;P&gt;I thought I&amp;#8217;d quickly describe what I think microformats are, 1 to make sure I am getting it, and 2 to help anyone else who is struggling (I don&amp;#8217;t think they make it too clear on the wiki &amp;#8211; but then again I am sometimes a bit slow!)&lt;/P&gt;
&lt;P&gt;So basically microformats are information that is structured so it can be easily read by a computer&amp;nbsp;and a human. &lt;/P&gt;
&lt;P&gt;To do this microformats are&amp;nbsp;born to use xHTML. So with xHTML using normal html attributes such as titles and classes, you can store the machine readable information, while the human readable info goes into the innertext. The examples that are always good to use are hCards and hCalendar. Here&amp;#8217;s my hCard:&lt;/P&gt;
&lt;P&gt;
&lt;DIV class=vcard&gt;&lt;A class="url fn" HREF="/nick"&gt;Nick Swan&lt;/A&gt; 
&lt;DIV class=org&gt;Dot Net Solutions&lt;/DIV&gt;
&lt;DIV class=adr&gt;
&lt;DIV class=street-address&gt;Royal Albert House, Sheet Street&lt;/DIV&gt;&lt;SPAN class=locality&gt;Windsor&lt;/SPAN&gt;, &lt;SPAN class=region&gt;Berks&lt;/SPAN&gt; &lt;SPAN class=postal-code&gt;SL4 1EB&lt;/SPAN&gt; &lt;/DIV&gt;
&lt;DIV class=tel&gt;07866 567042&lt;/DIV&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I created this using the &lt;A href="http://microformats.org/code/hcard/creator" target=_blank&gt;hCard creator&lt;/A&gt;. You can see that this displays nicely as it&amp;#8217;s well formatted xHTML. If I was to paste the xHTML directly into here however you can see:&lt;/P&gt;
&lt;P&gt;
&lt;P&gt;&amp;lt;DIV class=vcard&amp;gt;&amp;lt;A class="url fn" HREF="/nick"&amp;gt;Nick Swan&amp;lt;/A&amp;gt; &lt;BR&gt;&amp;lt;DIV class=org&amp;gt;Dot Net Solutions&amp;lt;/DIV&amp;gt;&lt;BR&gt;&amp;lt;DIV class=adr&amp;gt;&lt;BR&gt;&amp;lt;DIV class=street-address&amp;gt;Royal Albert House, Sheet Street&amp;lt;/DIV&amp;gt;&amp;lt;SPAN class=locality&amp;gt;Windsor&amp;lt;/SPAN&amp;gt;, &amp;lt;SPAN class=region&amp;gt;Berks&amp;lt;/SPAN&amp;gt; &amp;lt;SPAN class=postal-code&amp;gt;SL4 1EB&amp;lt;/SPAN&amp;gt; &amp;lt;/DIV&amp;gt;&lt;BR&gt;&amp;lt;DIV class=tel&amp;gt;07866 567042&amp;lt;/DIV&amp;gt;&amp;lt;/DIV&amp;gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;So you can see how the class attributes of each div describes what the innertext value is going to be. Having this as human and machine readable means that spiders can now crawl the web and get this information, as well as people who are viewing it and want to contact me. Putting this information in a structured manner rather than a free text input allows you, or other people to do so much more with it. You can now retain the structure of your information as you pass it around, for a demo of this make sure you check out Ray Ozzies &lt;A href="http://spaces.msn.com/rayozzie/blog/cns%21fb3017fbb9b2e142%21285.entry" target=_blank&gt;Live Clipboard&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;So is there going to be a microformat for everything? Well accord to the podcast apparently not. The group mentioned that people must already be publishing data in an unstructured manner, and you must be able to show that the world would benefit from the data being represented in an microformat.&lt;/P&gt;
&lt;P&gt;If I&amp;#8217;ve got any of this wrong by the way please explain where I&amp;#8217;m going wrong! Don&amp;#8217;t worry about making me look stupid, I&amp;#8217;d much rather someone just put me on the right tracks!&lt;/P&gt;
&lt;P&gt;What is my interest in this? &lt;A href="http://microformats.org/wiki/attention" target=_blank&gt;Attention microformats&lt;/A&gt;!&lt;/P&gt;
&lt;P&gt;Interesting that in the podcast everybody seemed to brush off the topic of OPML when Alex mentioned it!!!&lt;/P&gt;
&lt;P&gt;Technorati Tags&amp;nbsp;: &lt;A href="http://www.technorati.com/tag/microformats" target=_blank rel=tag&gt;Microformats&lt;/A&gt; &lt;A href="http://www.technorati.com/tag/microformat" target=_blank rel=tag&gt;Attention&lt;/A&gt;&lt;/P&gt;&lt;img src ="http://weblog.vb-tech.com/nick/aggbug/1516.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>