Class: XML::Reader

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-jdict/indexer/libxml_dictionary_indexer.rb

Overview

Add custom parsing methods to XML::Reader

Instance Method Summary collapse

Instance Method Details

#next_entityObject



157
158
159
160
161
162
# File 'lib/ruby-jdict/indexer/libxml_dictionary_indexer.rb', line 157

def next_entity
  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_textObject



152
153
154
155
# File 'lib/ruby-jdict/indexer/libxml_dictionary_indexer.rb', line 152

def next_text
  while (self.node_type != XML::Reader::TYPE_TEXT and self.read); end
  self.value
end