Class: XML::Reader
- Inherits:
-
Object
- Object
- XML::Reader
- Defined in:
- lib/index.rb
Overview
Add custom parsing methods to XML::Reader
Instance Method Summary collapse
-
#next_entity ⇒ Object
Get the next entity node.
-
#next_text ⇒ Object
Get the next text node.
Instance Method Details
#next_entity ⇒ Object
Get the next entity node
297 298 299 300 301 302 303 |
# File 'lib/index.rb', line 297 def next_entity # read until an entity node while (self.node_type != XML::Reader::TYPE_ENTITY and self.node_type != XML::Reader::TYPE_ENTITY_REFERENCE and self.read); end self.value end |
#next_text ⇒ Object
Get the next text node
291 292 293 294 295 |
# File 'lib/index.rb', line 291 def next_text # read until a text node while (self.node_type != XML::Reader::TYPE_TEXT and self.read); end self.value end |