Introducing the polyrex-schema gem

The polyrex-schema gem builds a Polyrex document from a string representation of the schema.

installation

gem1.9.1 install polyrex-schema

example

require 'polyrex-schema'

o = PolyrexSchema.new 'config/entry[name]/extension[string]/instruction[line,command]'
o.to_s

output :


  

<summary/>
<records>
  <entry>
    <summary><name/></summary>
    <records>
      <extension>
        <summary><string/></summary>
        <records>
          <instruction>
            <summary><line/><command/></summary>
            <records/>
          </instruction>
        </records>
      </extension>
    </records>
  </entry>
</records>

Resources:

Tags:
Source:
1456hrs.txt
Published:
19-01-2012 14:56