Simon Willison’s Weblog


Thursday, 27th March 2003

Why XML doesn’t suck

Tim Bray: Why XML Doesn’t Suck (a follow up to XML Is Too Hard For Programmers). I’d quote the best bits but there are just too many—this article clears up all of the loose ends in my understanding of why XML is such an important technology.

[... 53 words]

Attribute selectors now supported

I’ve updated document.getElementsBySelector to support CSS2 and CSS3 attribute selectors, as described here. Attribute selectors allow you to match elements based on any attribute using a variety or different rules including begins-with, ends-with, contains and more. The new version is tested in Mozilla, Phoenix and IE5/Windows (and I’m almost certain it works in IE6). There is a slight bug in Opera 7 preventing the ends-with selector from working which I have been unable to track down—any Opera javascript experts out there?

[... 172 words]

Retrieving all DOM descendants

First observation of the day: IE 5 for Windows doesn’t understand element.getElementsByTagName('*') to retrieve all descendants of an element in the DOM. element.all has the desired effect for that browser. So to retrieve all descendants in a way that will work on standards compliant browsers plus IE 5, the following seems to be the best bet:

[... 71 words]

2003 » March