Called for a CDATA block event.
# File lib/libxml/sax_callbacks.rb, line 69 def on_cdata_block(cdata) STDOUT << "on_cdata_block" << "\n" << " cdata " << cdata << "\n" STDOUT.flush end
Called for a characters event.
# File lib/libxml/sax_callbacks.rb, line 76 def on_characters(chars) STDOUT << "on_characters" << "\n" << " chars " << chars << "\n" STDOUT.flush end
Called for a comment event.
# File lib/libxml/sax_callbacks.rb, line 83 def on_comment(comment) STDOUT << "on_comment" << "\n" << " comment: " << comment << "\n" STDOUT.flush end
Called for a end document event.
# File lib/libxml/sax_callbacks.rb, line 90 def on_end_document STDOUT << "on_end_document\n" STDOUT.flush end
Called for a end element event.
# File lib/libxml/sax_callbacks.rb, line 96 def on_end_element_ns(name, prefix, uri) STDOUT << "on_end_element_ns" << "\n" << " name: " << name << "\n" << " prefix: " << prefix << "\n" << " uri: " << uri << "\n" STDOUT.flush end
Called for parser errors.
# File lib/libxml/sax_callbacks.rb, line 105 def on_error(error) STDOUT << "on_error" << "\n" " error " << error << "\n" STDOUT.flush end
Called for an external subset event.
# File lib/libxml/sax_callbacks.rb, line 112 def on_external_subset(name, external_id, system_id) STDOUT << "on_external_subset" << "\n" " external_id " << external_id << "\n" << " system_id " << system_id << "\n" STDOUT.flush end
Called for an external subset notification event.
# File lib/libxml/sax_callbacks.rb, line 120 def on_has_external_subset STDOUT << "on_has_internal_subset\n" STDOUT.flush end
Called for an internal subset notification event.
# File lib/libxml/sax_callbacks.rb, line 126 def on_has_internal_subset STDOUT << "on_has_internal_subset\n" STDOUT.flush end
Called for an internal subset event.
# File lib/libxml/sax_callbacks.rb, line 132 def on_internal_subset(name, external_id, system_id) STDOUT << "on_internal_subset" << "\n" " external_id " << external_id << "\n" << " system_id " << system_id << "\n" STDOUT.flush end
Called for ‘is standalone’ event.
# File lib/libxml/sax_callbacks.rb, line 140 def on_is_standalone STDOUT << "on_is_standalone\n" STDOUT.flush end
Called for an processing instruction event.
# File lib/libxml/sax_callbacks.rb, line 146 def on_processing_instruction(target, data) STDOUT << "on_characters" << "\n" " target: " << target << "\n" << " data: " << data << "\n" STDOUT.flush end
Called for a reference event.
# File lib/libxml/sax_callbacks.rb, line 154 def on_reference(name) STDOUT << "on_reference:" << "\n" << " name:" << name << "\n" STDOUT.flush end
Called for a start document event.
# File lib/libxml/sax_callbacks.rb, line 161 def on_start_document STDOUT << "on_start_document\n" STDOUT.flush end
Called for a start element event.
# File lib/libxml/sax_callbacks.rb, line 167 def on_start_element_ns(name, attributes, prefix, uri, namespaces) STDOUT << "on_start_element_ns" << "\n" << " name: " << name << "\n" << " attr: " << (attributes || Hash.new).inspect << "\n" << " prefix: " << prefix << "\n" << " uri: " << uri << "\n" << " ns_defs: " << (namespaces || Hash.new).inspect << "\n" STDOUT.flush end