today | current | recent | random ... categories | search ... who ... syndication

Thursday, January 23 2003

So, I started writing something about Mark's "How I Learned to Love Being Loosey Goosey Even Though I'm a Python-weenie" RSS article earlier this morning

but stopped because, frankly, who cares? But then I saw Mark waxing poetic about how [I]t takes balls to write an article for XML.com demonstrating how to parse an XML-based format without an XML parser. So here goes: I sped-read (speed-readed?) the article last night because I am already pretty familiar with the state of non-validating RSS feeds, tools like SGMLParser (you can probably parse RSS with HTML::Parser, but I've never tried) and the need to actually get something done in the face of all those people who don't give a rat's ass about The Right Way to do things. What I didn't notice was the bit about not using an XML parser. Now again, I think I understand where Mark is coming from and, if I do, I agree in principle with what he's trying to do. But it just seems so half-assed to go to all the trouble of parsing poorly formed XML, treat it like XML and then not actually return the data as XML. It is, I grant you, something of a pendantic argument. There's nothing to prevent me, or someone else, from adding hooks to Mark's rssparser code to define an as_xml method or add the hooks that would generate SAX events which, to my thinking, would be the most useful thing because then you can magically just assume it's XML again, like it's supposed to be. I suppose my problem is one about what seems like a lazy design and a lazy interface. I can see the need for something like this; ask any Perl programmer who has to wrap all their calls to XML::Parser in eval blocks because it adheres to the XML spec and actually dies when it encounters a problem. It just seems so...inelegant. Your mileage may vary.

refers to

meta

James Spahr : "I made a Movable Type BBEdit glossary"

refers to

meta

 
 
Wednesday, January 22 2003 ←  → Friday, January 24 2003