Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

HugeXML.read xml, elements_lookup do |element|
  # => element{ :name, :value, :attributes}
end

OR simply

HugeXML.read xml do |element|
# this will catch all opening elements

You can have some more control as

HugeXML.read xml, elements_lookup do |element, reader|

Here reader represents (Nokogir)pointer/cursor (but not actually itself is) which keeps on moving as we keep
on reading file stream. and has the following methods for us

element = reader.try_next elements
element = reader.try_next_with_value elements
element = reader.try_next_with_attributes elements

Note* use reader on trial basis :)

I just got one more similar example using ox
https://gist.github.com/amolpujari/5966431









About

reading huge, large xml in ruby made easy

Resources

Stars

19 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages