Skip to content

Instantly share code, notes, and snippets.

Created June 22, 2012 00:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/3a8919272cfdbcb4ca6e to your computer and use it in GitHub Desktop.
Save anonymous/3a8919272cfdbcb4ca6e to your computer and use it in GitHub Desktop.
skip first line of file
def read_flame_file_att(file_in)
##file_in=file_in.lines.drop(1).take(300)
xml_data = File.open(file_in) {|source_file| Hpricot.XML(source_file)}
flame_att = []
(xml_data/:flame).each do |flame|
flame_att = flame.attributes.to_hash
end
return flame_att
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment