Linux Posts, Programming Posts, Atmega Posts and others.
Search This Blog
Wednesday, January 21, 2009
Parsing XML file, using ruby from terminal
This command will display contents of a particular tag of the specified xml file $ruby -e 'require "rexml/document"; include REXML; Document.new(File.new("filepath.xml")).elements[1].elements.each {|x| puts x.elements["tagname"] }'
No comments:
Post a Comment