Beautiful LINQ to Xml

Is there anything better in life than finding a better way to do something? An easier commute, a better night’s sleep, a tastier cake recipe?

In starting the Nike+ importer for, I knew I was going to have to deal with a bit of XML. Which used to mean XPath.

Not so much anymore. LINQ to XML, you rock my world. It turns XML like this…

	<extendedData dataType="distance" intervalType="time" intervalUnit="s" intervalValue="10">
	0.0, 0.0372, 0.0705, 0.1041, ....
	<extendedData dataType="speed" intervalType="time" intervalUnit="s" intervalValue="10">
	0.0, 13.3866, 12.6856, 12.4970, ....
	<extendedData dataType="heartRate" intervalType="time" intervalUnit="s" intervalValue="10">
	0, 88, 108, 115, ....

With a little bit of code like this:
Continue reading


Working on Nike+ Importer for

I’m a huge fan of the website I use it to track all my sporting life activities. The primary reason I use this site, instead of one of the hundreds like it, is that you can track anything – yoga, rowing, running, P-90x, underwater hockey, tiddlywinks, whatever. Throw in some customizable reporting and some great hardware integration, and it’s free, and you’ve got a winner.

However, that doesn’t mean there aren’t things I don’t like about the site, and things I wish could be better. But since it’s a free sight, I don’t want to complain, but rather I’d like to help out and make the site better.

So I’ve talked to the site’s creator (Eric Yee) and volunteered to help craft some plugins for the site for him.

First up: a Nike+ data importer. The importer will be written in C#, calling some RESTful web services, parsing XML, etc etc.