Project

easydom

0.0
No commit activity in last 3 years
No release in over 3 years
Experimental gem to access XML elements from simple dot notation (e.g. person.name).
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.3, >= 0.3.1
 Project Readme

Introducing the EasyDom gem

require 'easydom'

xml = "<home>
  <kitchen>
    <light switch='off'/>
  </kitchen>

  <porch>
    <doorentry>
      <button name='btn'></button>
    </doorentry>
    <door lock='locked'>
  </porch>

  <livingroom>
  </livingroom>
</home>
"


home = EasyDom.new(xml, debug: true)
home.kitchen #=> #<EasyDom:0x00005653821e4db8 @debug=false, @e=<kitchen styl...

home.kitchen.light.switch #=> off
home.kitchen.light.switch = 'on'
home.kitchen.light.switch #=> on

Element attributes values are written back to the XML document through the DOM.

Resources

easydom dom xml