I found this interesting post explaining how to use saxparser for large xml files in ruby
http://www.ioncannon.net/programming/643/fast-xml-parsing-with-ruby/
I would like to use the line : parser = XML::SaxParser.file(“posts.xml”) in one of my controllers, but instead of a file I have an xml post from another app, can anyone help with the syntax?
Thanks a lot
I found this interesting post explaining how to use saxparser for large xml files
Share
I’m a ruby noob, but give this a try.
Custom class file for parsing:
Now in the file you would like to parse the XML:
The code above was stolen from this post on Luca Guidi’s blog.