Class: NQXML::Node
- Inherits:
-
Object
- Object
- NQXML::Node
- Defined in:
- lib/xmlrpc/parser.rb
Instance Method Summary collapse
- #[](index) ⇒ Object
- #childNodes ⇒ Object
- #hasChildNodes ⇒ Object
- #nodeName ⇒ Object
- #nodeType ⇒ Object
- #nodeValue ⇒ Object
- #removeChild(node) ⇒ Object
Instance Method Details
#[](index) ⇒ Object
28 29 30 |
# File 'lib/xmlrpc/parser.rb', line 28 def [] (index) @children[index] end |
#childNodes ⇒ Object
22 23 24 |
# File 'lib/xmlrpc/parser.rb', line 22 def childNodes @children end |
#hasChildNodes ⇒ Object
25 26 27 |
# File 'lib/xmlrpc/parser.rb', line 25 def hasChildNodes not @children.empty? end |
#nodeName ⇒ Object
45 46 47 48 |
# File 'lib/xmlrpc/parser.rb', line 45 def nodeName #TODO: error when wrong Entity-type @entity.name end |
#nodeType ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/xmlrpc/parser.rb', line 32 def nodeType if @entity.instance_of? NQXML::Text then :TEXT elsif @entity.instance_of? NQXML::Comment then :COMMENT #elsif @entity.instance_of? NQXML::Element then :ELEMENT elsif @entity.instance_of? NQXML::Tag then :ELEMENT else :ELSE end end |
#nodeValue ⇒ Object
41 42 43 44 |
# File 'lib/xmlrpc/parser.rb', line 41 def nodeValue #TODO: error when wrong Entity-type @entity.text end |
#removeChild(node) ⇒ Object
19 20 21 |
# File 'lib/xmlrpc/parser.rb', line 19 def removeChild(node) @children.delete(node) end |