Sha256: d685342e825f61dd8dda99e19cc1f601a0a102c305e33b0c35a59d2a8fcdc140

Contents?: true

Size: 477 Bytes

Versions: 12

Compression:

Stored size: 477 Bytes

Contents

#! /usr/bin/ruby

require 'rubygems'
require 'libxml'

include LibXML

class PostCallbacks
  include XML::SaxParser::Callbacks

  def on_start_element(element, attributes)
    if element == 'Iteration_iter-num'
      # Process row of data here
      print "---- ",element
    end
    # if element == 'Hsp_score'
    #   print "---- ",element
    # end
  end
end

parser = XML::SaxParser.file("test/data/nt_example_blastn.m7")
parser.callbacks = PostCallbacks.new
parser.parse

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
bio-blastxmlparser-2.0.4 sample/libxml_sax.rb
bio-blastxmlparser-2.0.3 sample/libxml_sax.rb
bio-blastxmlparser-2.0.2 sample/libxml_sax.rb
bio-blastxmlparser-2.0.1 sample/libxml_sax.rb
bio-blastxmlparser-2.0.0 sample/libxml_sax.rb
bio-blastxmlparser-1.1.2 sample/libxml_sax.rb
bio-blastxmlparser-1.1.1 sample/libxml_sax.rb
bio-blastxmlparser-1.1.0 sample/libxml_sax.rb
bio-blastxmlparser-1.0.1 sample/libxml_sax.rb
bio-blastxmlparser-1.0.0 sample/libxml_sax.rb
bio-blastxmlparser-0.6.1 sample/libxml_sax.rb
bio-blastxmlparser-0.6.0 sample/libxml_sax.rb