Skip to content
Prev 77611 / 398502 Next

SAX Parser best practise

Hi Jan,
On 20 Sep 2005, Hummel at mpimp-golm.mpg.de wrote:
I missed the xml snip, but I think I get the gist of your question.
I'm not familiar with the addContext arg and don't know whether or not
that provides another solution to your problem.

I do know that you can do what you want by writing "state machine"
code.  I played a little with using the state arg for this purpose,
but ran into some problems (sorry, no details in my memory banks).

There is an example of the state approach in Bioconductor's AnnBuilder
package.  See R/GO.R.  It isn't the prettiest or best example, but
maybe it will help get you going.

The general approach is to use '<<-' to reach up a level and set the
state variables from inside the tag handlers.

HTH,

+ seth
Message-ID: <m2psr2pke9.fsf@macaroni.local>
In-Reply-To: <1F5B2A5E6712B94DA65EA9EBF0A1A38230E75F@EMAIL.mpimp-golm.mpg.de> (Jan Hummel's message of "Wed, 21 Sep 2005 08:43:41 +0200")