123456789_123456789_123456789_123456789_123456789_

Module: LibXML::XML::SaxParser::VerboseCallbacks

Relationships & Source Files
Defined in: lib/libxml/sax_callbacks.rb

Instance Method Summary

Instance Method Details

#on_cdata_block(cdata)

Called for a CDATA block event.

[ GitHub ]

  
# File 'lib/libxml/sax_callbacks.rb', line 70

def on_cdata_block(cdata)
  STDOUT << "on_cdata_block" << "\n" <<
            "  cdata " << cdata << "\n"
  STDOUT.flush
end

#on_characters(chars)

Called for a characters event.

[ GitHub ]

  
# File 'lib/libxml/sax_callbacks.rb', line 77

def on_characters(chars)
  STDOUT << "on_characters" << "\n" <<
            "  chars " << chars << "\n" 
  STDOUT.flush
end

#on_comment(comment)

Called for a comment event.

[ GitHub ]

  
# File 'lib/libxml/sax_callbacks.rb', line 84

def on_comment(comment)
  STDOUT << "on_comment" << "\n" <<
            "  comment: " << comment << "\n"
  STDOUT.flush
end

#on_end_document

Called for a end document event.

[ GitHub ]

  
# File 'lib/libxml/sax_callbacks.rb', line 91

def on_end_document
  STDOUT << "on_end_document\n"
  STDOUT.flush
end

#on_end_element_ns(name, prefix, uri)

Called for a end element event.

[ GitHub ]

  
# File 'lib/libxml/sax_callbacks.rb', line 97

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

#on_error(error)

Called for parser errors.

[ GitHub ]

  
# File 'lib/libxml/sax_callbacks.rb', line 106

def on_error(error)
  STDOUT << "on_error" << "\n"
            "  error " << error << "\n"
  STDOUT.flush
end

#on_external_subset(name, external_id, system_id)

Called for an external subset event.

[ GitHub ]

  
# File 'lib/libxml/sax_callbacks.rb', line 113

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

#on_has_external_subset

Called for an external subset notification event.

[ GitHub ]

  
# File 'lib/libxml/sax_callbacks.rb', line 121

def on_has_external_subset
  STDOUT << "on_has_internal_subset\n"
  STDOUT.flush
end

#on_has_internal_subset

Called for an internal subset notification event.

[ GitHub ]

  
# File 'lib/libxml/sax_callbacks.rb', line 127

def on_has_internal_subset
  STDOUT << "on_has_internal_subset\n"
  STDOUT.flush
end

#on_internal_subset(name, external_id, system_id)

Called for an internal subset event.

[ GitHub ]

  
# File 'lib/libxml/sax_callbacks.rb', line 133

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

#on_is_standalone

Called for ‘is standalone’ event.

[ GitHub ]

  
# File 'lib/libxml/sax_callbacks.rb', line 141

def on_is_standalone
  STDOUT << "on_is_standalone\n"
  STDOUT.flush
end

#on_processing_instruction(target, data)

Called for an processing instruction event.

[ GitHub ]

  
# File 'lib/libxml/sax_callbacks.rb', line 147

def on_processing_instruction(target, data)
  STDOUT << "on_characters" << "\n"
            "  target: " << target << "\n" <<
            "  data:   " << data << "\n"
  STDOUT.flush
end

#on_reference(name)

Called for a reference event.

[ GitHub ]

  
# File 'lib/libxml/sax_callbacks.rb', line 155

def on_reference(name)
  STDOUT << "on_reference:" << "\n" <<
            "  name:" << name << "\n"
  STDOUT.flush
end

#on_start_document

Called for a start document event.

[ GitHub ]

  
# File 'lib/libxml/sax_callbacks.rb', line 162

def on_start_document
  STDOUT << "on_start_document\n"
  STDOUT.flush
end

#on_start_element_ns(name, attributes, prefix, uri, namespaces)

Called for a start element event.

[ GitHub ]

  
# File 'lib/libxml/sax_callbacks.rb', line 168

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