# File contrib/autodis_1.rb, line 41 def metahandle puts "\# Automatically generated NQXML::Dispatcher code.\n\# Tweak as needed.\n\nrequire 'nqxml/dispatcher'\nnd = NQXML::Dispatcher.new(str)\n\n" ends = {} context = [] each do |e| k = e.event_key if k if e.respond_to? tagStart?:tagStart? if e.tagStart? context.push(e.name) output(e.event_key, context, e.attrs["action"]) ends[context] = e.attrs["end"] end end if e.respond_to? text:text output(e.event_key, context, e.text) end if e.respond_to? tagEnd?:tagEnd? if e.tagEnd? output(e.event_key, context, ends[context]) context.pop end end end end end