< back

Sam-I-Am's Builder Blog

Work type stuff - handy urls and notes on the trials and tribulations of a web builder.

Thursday, October 25, 2001

Dynamic Tree Created from an XML Data File
Some new files uploaded to the TestSuite, including this one, which stiches together a few things I've been thinking of for a while.
1) it uses a little cgi I wrote to take a url, fetch the file and return it as a javscript string variable assignment - for use in a <script src..> context, or with a bookmarklet as a way to generate javascript strings for output or manipulation. Its a way to get external data to a script in a useable format. (feel free to use)
2) it uses a little javascript xml parser I found to parse this string
3) using the xml structure it builds a navigation "tree", so updating the leftnav is a matter of editing an xml file.

0 Comments:

Post a Comment

<< Home

< back

© Copyright 1999-2005 Sam Foster