Class: XML::Node
- Inherits:
-
Object
- Object
- XML::Node
- Defined in:
- lib/libxml_rexml_compat.rb
Overview
This adds some methods to the xml/libxml library to make it easier to re-use code written for the REXML api.
Defined Under Namespace
Modules: REXMLCompat
Instance Method Summary collapse
Instance Method Details
#add_attribute(key, val) ⇒ Object
13 14 15 |
# File 'lib/libxml_rexml_compat.rb', line 13 def add_attribute(key, val) self[key] = val end |
#attributes ⇒ Object
9 10 11 |
# File 'lib/libxml_rexml_compat.rb', line 9 def attributes self end |
#elements ⇒ Object
17 18 19 |
# File 'lib/libxml_rexml_compat.rb', line 17 def elements REXMLCompat::Elements.new(self) end |
#text ⇒ Object
5 6 7 |
# File 'lib/libxml_rexml_compat.rb', line 5 def text content end |