Archive | September, 2008

Parsing tables with XPath without hardcoded indexes

24 Sep

Let’s say you have to get some data from a XML provided by a 3rd party. You don’t have access or rights to modify that XML and the semantic, well, is not as good as you, semantic lover, would like to. In fact, let’s face it, the XML sucks in semantic and it has tables inside that makes you remember the nineties and those HTMLs.

First thing you do is a XPath expression based on hardcoded indexes, of course. “Please sir, would you mind to give me the TR[4] from TD[1]? Yes, I already know where is this data from, thanks”. But let’s imagine for a moment that your friend, the 3rd party, decide one day to change the XML, oor simply to change the order of the fields in the table, oor to add more fields to the table, oor… You don’t want to be dependent on the 3rd party mood to change your code and your XPath expressions one day and another, right? So better live without hardcoded indexes, if you can.

But… how? I had to fight with two scenarios, and I managed to get it done without hardcoded indexes. Of course your mileage may vary, but here’s how I did it:
[...]

Just a thought

23 Sep

What about headphones plug with MagSafe on it?

I’m not sure if they can managed to do the MagSafe small enough for a jack 3.5 connector, but my iPod Nano and my headphones will indeed appreciate it so much ;D

Justice Live @ I Love Techno

9 Sep

Siguiendo con los posts musicales y aprovechando la coyuntura del I Love Techno de este año, que también va Justice, aquí va una joyita en forma de sesión: Justice Live at I Love Techno (Stubru) 21-10-2006

A disfrutarla!

http://rapidshare.com/files/143882649/5278915.rar.html

Y de paso este video de la canción DVNO, en Japón. Al loro con la escenografía y las luces:
[...]