Sha256: c14d72dc48aa17e4fa420808947968bcbe89465fcf2b8929d0cd277124b1c3dc

Contents?: true

Size: 330 Bytes

Versions: 40

Compression:

Stored size: 330 Bytes

Contents

require 'ox'

doc = Ox::Document.new(:version => '1.0')

top = Ox::Element.new('top')
top[:name] = 'sample'
doc << top

mid = Ox::Element.new('middle')
mid[:name] = 'second'
top << mid

bot = Ox::Element.new('bottom')
bot[:name] = 'third'
mid << bot

xml = Ox.dump(doc)
puts xml

doc2 = Ox.parse(xml)
puts "Same? #{doc == doc2}"

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
ox-1.2.13 test/gen_sample.rb
ox-1.2.12 test/gen_sample.rb
ox-1.2.11 test/gen_sample.rb
ox-1.2.10 test/gen_sample.rb
ox-1.2.9 test/gen_sample.rb
ox-1.2.8 test/gen_sample.rb
ox-1.2.7 test/gen_sample.rb
ox-1.2.6 test/gen_sample.rb
ox-1.2.5 test/gen_sample.rb
ox-1.2.4 test/gen_sample.rb
ox-1.2.3 test/gen_sample.rb
ox-1.2.2 test/gen_sample.rb
ox-1.2.1 test/gen_sample.rb
ox-1.2.0 test/gen_sample.rb
ox-1.1.1 test/gen_sample.rb
ox-1.1.0 test/gen_sample.rb
ox-1.0.3 test/gen_sample.rb
ox-1.0.2 test/gen_sample.rb
ox-1.0.1 test/gen_sample.rb
ox-1.0.0 test/gen_sample.rb