Simon Willison’s Weblog

Subscribe

Thursday, 7th November 2002

Javascript XML parser

I’ve added Dave Lindquist’s Javascript XML parser to my blog entry form using the code he posted in the discussion on webgraphics. It works an absolute treat—it even pops up an alert message telling me what is wrong with the post (usually ’End tag does not match opening tag’) and won’t let me submit the form until I have fixed the error. The actual XML parsing library is a truly impressive piece of work, despite the lack of documentation. Dave suggests that it is pretty much obsolete now that most modern browsers have a built in XML parser accessible through scripting, but his parser is easily fast enough for my purposes.

[... 121 words]

Validating weblog entries

webgraphics have an interesting discussion running about the need for a weblog entry XHTML validator. Dave Lindquist suggests using his JavaScript XML Parser to perform validation on the client side, which seems like an excellent solution. I already use PHP’s XML parsing functions on this blog to check my entries are valid XML when I post them (and extract links for use with my pingback client) but additional client side validation would save the round trip to the server. The discussion also covers the idea of using the W3C’s validator to check entries—as soon as they finalise their XML interface (as used by my validator web service) I can see a lot of interest forming in this kind of automated validation.

[... 136 words]

aqTree 3

Stuart has released aqTree3, an upgrade to previous aqTree versions which takes in to account some of the best ideas from both Eric Meyer’s pure CSS menus and Dave Lindquist’s recently released drop-down / expandable trees. aqTree’s great strength is that it requires no additional markup at all on top of the nested lists, other than a class definition which the script will pick up via the DOM. All presentation and positioning is now controlled with CSS applied to the list structure (previous versions of aqTree used the DOM to transform the list in to DIVs) and Stuart has included an extra script, aqdd, to handle drop down menus as well. The article includes a mini-essay on how elegant DHTML should be implemented, which is well worth reading.

[... 136 words]

2002 » November

MTWTFSS
    123
45678910
11121314151617
18192021222324
252627282930