Sha256: e9b2f709354e65b9ce05c84c091582242991399959c625cfcbd2ef1264577170

Contents?: true

Size: 545 Bytes

Versions: 10

Compression:

Stored size: 545 Bytes

Contents

#require 'axml'


correct = '<scan num="12">
  <peaks>ABCD</peaks>
</scan>
'


short = '<scan num="12">
  <peaks>ABCD</peaks>
'

long = '<scan num="12">
  <peaks>ABCD</peaks>
</scan>
</scan>
'

require 'xml/libxml'

XML::Error.set_handler do |error|
  puts "GOTCAH!"
  #puts error.to_s
end

[correct, short, long].each do |str|
  reader = XML::Reader.string str
  x = reader.read
  p x
end


=begin

x = AXML.parse(correct)
puts x.to_s
begin
y = AXML.parse(short)
rescue
  puts "RESCUED"
puts y.to_s
end
#x = AXML.parse(long)
#puts x.to_s
=end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ms-msrun-0.3.6 spec/ms/msrun/test_parsing_xml_frags/test_failures.rb
ms-msrun-0.3.5 spec/ms/msrun/test_parsing_xml_frags/test_failures.rb
ms-msrun-0.3.4 spec/ms/msrun/test_parsing_xml_frags/test_failures.rb
ms-msrun-0.3.3 spec/ms/msrun/test_parsing_xml_frags/test_failures.rb
ms-msrun-0.3.2 spec/ms/msrun/test_parsing_xml_frags/test_failures.rb
ms-msrun-0.3.1 spec/ms/msrun/test_parsing_xml_frags/test_failures.rb
ms-msrun-0.3.0 spec/ms/msrun/test_parsing_xml_frags/test_failures.rb
ms-msrun-0.2.4 spec/ms/msrun/test_parsing_xml_frags/test_failures.rb
ms-msrun-0.2.1 spec/ms/msrun/test_parsing_xml_frags/test_failures.rb
ms-msrun-0.2.0 spec/ms/msrun/test_parsing_xml_frags/test_failures.rb