Sha256: 4d71ad04ae39333adde17d9aa48c18674923c7a23db10b98d8ba41c720f21e0d
Contents?: true
Size: 427 Bytes
Versions: 3
Compression:
Stored size: 427 Bytes
Contents
#!/usr/bin/ruby require "#{File.dirname($0)}/../smart" # with next puller = XML::Smart.pull(File.open(File.dirname($0) + "/EXAMPLE.xml")) while puller.next do puts puller.to_s p puller.node_type end # or with closure XML::Smart.pull(File.open(File.dirname($0) + "/EXAMPLE.xml")) { |puller| unless puller.attributes.empty? puller.attributes.each { |qname,value| puts "#{qname}=#{value}" } end }
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ruby-xml-smart-0.1.12.1-i486-linux | examples/pull.rb |
ruby-xml-smart-0.1.12-i486-linux | examples/pull.rb |
ruby-xml-smart-0.1.11-i486-linux | examples/pull.rb |