Project

sectionx

0.0
No commit activity in last 3 years
No release in over 3 years
Makes it convenient to store and retrieve hierarchical data in an XML format known as SectionX
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.7.2, ~> 0.7
>= 0.5.3, ~> 0.5
>= 0.3.13, ~> 0.3
>= 0.9.2, ~> 0.9
 Project Readme

Introducing the SectionX gem

The SectionX gem makes it convenient to store and retrieve hierarchical data in an XML format known as SectionX.

require 'sectionx'

s =<<EOF
<?sectionx id='personal'?>

title: My Personal Profile
tags: profile personal

----------------------------

name: John Smith
age: 68

# Employment
Employer: FQM R&S
EOF

sx = SectionX.new
sx.import s
puts sx.to_xml pretty: true

output:

<?xml version='1.0' encoding='UTF-8'?>
<personal>
  <summary>
    <title>My Personal Profile</title>
    <tags>profile personal</tags>
  </summary>
  <sections>
    <section>
      <summary>
        <name>John Smith</name>
        <age>68</age>
      </summary>
      <sections/>
    </section>
    <section title='Employment'>
      <summary>
        <employer>FQM R&S</employer>
      </summary>
      <sections/>
    </section>
  </sections>
</personal>

Resources