Created
January 8, 2009 18:40
-
-
Save sethladd/44830 to your computer and use it in GitHub Desktop.
example ruby and libxml code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'libxml' | |
doc = LibXML::XML::Document.file('test.xml') | |
rs = doc.find('//R') | |
rs.each do |r| | |
u = r.find_first('U') | |
s = r.find_first('S') | |
puts "S: #{s} and U: #{u}" | |
end | |
rs = nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment