From: pete@... Date: 2006-10-22T04:30:14+09:00 Subject: Re: One more way to parse XML... In article <1161423290.5377.28.camel@localhost.localdomain>, Ross Bamford wrote: >On Sat, 2006-10-21 at 16:15 +0900, pete@jwgibbs.cchem.berkeley.edu >wrote: >> I thought I'd put this out to see if there's any interest. > >This looks pretty cool. It has echoes of the Jakarta Commons Digester, >of which I made a Ruby port a while back (http://digestr.rubyforge.org), >though using libxml-ruby rather than REXML. Hmm, yes. I hadn't come across the "digester" before, but there do seem to be parallel trains of thought there. (I looked through the Jakarta version rather than yours -- finding a magazine article to read is more comfortable than chugging through documentation!) Looks nice (and much more extensive than mine, of course). The main difference (in philosophy) seems to be that the digester describes the tree with complete absolute paths for each node, where my scheme has each node only knowing about its immediate descendants. >I quite like the digester model and have found it very handy for dealing >with certain types of XML (mostly XML from the Java world I guess). The article I read did seem to be oriented to building a tree (of Beans) in memory (so aren't we sort of back to DOM?) but I gather that you can provide other custom methods to do other kinds of processing. Thanks, -- Pete --