Friday, December 10, 2004

Been a bit quiet of late...

Well, no I haven't been quiet of late at all. I've been frantically blogging my heart out, but just about useless stuff.

In fact, I've had a look through my blog entries, and it would seem the last .net related post was nearly a fortnight ago!

I haven't stopped coding. In fact, I've just been working over the past couple of weeks on a client for the Blogger API. It's been quite slow going, though. It uses quite a few things that I just haven't really used before. Well. It uses one thing I haven't really taken the time to really look at. How .NET handles XML.

Although I like XML, I haven't really played about with it in itself. Sure, I can read my way through a file and get what's going on. I can even (at a push) knock up a simple XSL file to churn out some templated xml. When it comes to actually using the thing in an app, that's where the mystery begins...

If you take the time to look through the Blogger API, the returns from method calls look really weird! Here's a snippet:


<value>Blogger Biz Dev</value>

Now reading that's pretty straightforward. You've got a Struct element, inside a Value element, which contains a number of members, each of which has a Name element and a Value element.

Easy, huh?

For some reason, though, running that through an XML reader and parsing that down to a set of Name-Value pairs so I can create an object from it seems to be really hard! I dunno. I think it's just a heady combination of me not knowing enough about it, and the whole thing just hitting a blind spot in my head (Anyone else get them?).

The soution I've been trying to make work is by using nested XPathNodeIterator's to read through each member element, and populate a HashTable with the names and values, and create a BlogUserInfo ojbect from that.

Unfortunately I just can't get my head around whereabouts in the loop the values should be read off and the ojbect created. I'd post code, but it's really ugly. Once I get it working, then I can make it look pretty, but until then it's just a mess of temp variables and suchlike.

Oh well. Mrs Mawoo's off out tonight, so I should be able to have a bit of a sit down and spend some real time on the problem. No doubt, when I get it working, I'll let y'all know (I'll be that damned happy!).

Otherwise might just lose my patience over it and spend all night playing with SQL Server Analysis Services. I'm trying to get to grips with that at the moment. Lots of cramming. Lots of reading. Quite good fun, though.

ust wanted to share.

No comments: