0.0
Low commit activity in last 3 years
No release in over a year
The XML registry can be used to store or retrieve app settings etc. in an XML document.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.7, >= 0.7.3
 Project Readme

Introducing the xml-registry gem

Installation

gem install xml-registry

Example

require 'xml-registry' 

s =<<REG
[app/app1]
"admin"="jrobertson"
"pin-no"="1234"

[app/app2]
"admin"="dsmith"
"pin-no"="4321"
REG

reg = XMLRegistry.new 
reg.set_key 'app/whiteboard/colour', 'red' 
reg.to_xml 
#=> "red" 

reg.import s 
reg.to_xml

output:

<root>
  <system/>
  <app>
    <whiteboard>
      <colour>red</colour>
    </whiteboard>
    <app1>
      <admin>jrobertson</admin>
      <pin-no>1234</pin-no>
    </app1>
    <app2>
      <admin>dsmith</admin>
      <pin-no>4321</pin-no>
    </app2>
  </app>
</root>

puts reg.export 

output:

[app/whiteboard]
"colour"="red"

[app/app1]
"admin"="jrobertson"
"pin-no"="1234"

[app/app2]
"admin"="dsmith"
"pin-no"="4321"