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.5.4 test/gen_sample.rb
ox-1.5.3 test/gen_sample.rb
ox-1.5.2 test/gen_sample.rb
ox-1.5.1 test/gen_sample.rb
ox-1.5.0 test/gen_sample.rb
ox-1.4.6 test/gen_sample.rb
ox-1.4.5 test/gen_sample.rb
ox-1.4.4 test/gen_sample.rb
ox-1.4.3 test/gen_sample.rb
ox-1.4.2 test/gen_sample.rb
ox-1.4.1 test/gen_sample.rb
ox-1.4.0 test/gen_sample.rb
ox-1.3.5 test/gen_sample.rb
ox-1.3.4 test/gen_sample.rb
ox-1.3.3 test/gen_sample.rb
ox-1.3.2 test/gen_sample.rb
ox-1.3.1 test/gen_sample.rb
ox-1.3.0 test/gen_sample.rb
ox-1.2.15 test/gen_sample.rb
ox-1.2.14 test/gen_sample.rb