Sha256: e9119ea359d05027882d5761e985420683dbcfae4c6fece08c44b4fb76956956
Contents?: true
Size: 340 Bytes
Versions: 3
Compression:
Stored size: 340 Bytes
Contents
#!/usr/bin/ruby require "#{File.dirname($0)}/../smart" # When a closure is used, then the changes are written back to the disk XML::Smart.modify(File.dirname($0) + "/EXAMPLE.xml") { |doc| node = doc.root.find("/test/names/name")[0] node.text = Time.now } # Print the document puts XML::Smart.open(File.dirname($0) + "/EXAMPLE.xml")
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ruby-xml-smart-0.1.12.1-i486-linux | examples/write.rb |
ruby-xml-smart-0.1.12-i486-linux | examples/write.rb |
ruby-xml-smart-0.1.11-i486-linux | examples/write.rb |