module LibXML::XML::SaxParser::VerboseCallbacks

Public Instance Methods

on_cdata_block(cdata) click to toggle source

Called for a CDATA block event.

   # File lib/libxml/sax_callbacks.rb
70 def on_cdata_block(cdata)
71   STDOUT << "on_cdata_block" << "\n" <<
72             "  cdata " << cdata << "\n"
73   STDOUT.flush
74 end
on_characters(chars) click to toggle source

Called for a characters event.

   # File lib/libxml/sax_callbacks.rb
77 def on_characters(chars)
78   STDOUT << "on_characters" << "\n" <<
79             "  chars " << chars << "\n" 
80   STDOUT.flush
81 end
on_comment(comment) click to toggle source

Called for a comment event.

   # File lib/libxml/sax_callbacks.rb
84 def on_comment(comment)
85   STDOUT << "on_comment" << "\n" <<
86             "  comment: " << comment << "\n"
87   STDOUT.flush
88 end
on_end_document() click to toggle source

Called for a end document event.

   # File lib/libxml/sax_callbacks.rb
91 def on_end_document
92   STDOUT << "on_end_document\n"
93   STDOUT.flush
94 end
on_end_element_ns(name, prefix, uri) click to toggle source

Called for a end element event.

    # File lib/libxml/sax_callbacks.rb
 97 def on_end_element_ns(name, prefix, uri)
 98   STDOUT << "on_end_element_ns" << "\n" <<
 99             "  name: " << name << "\n" <<
100             "  prefix: " << prefix << "\n" <<
101             "  uri: " << uri << "\n"
102   STDOUT.flush
103 end
on_error(error) click to toggle source

Called for parser errors.

    # File lib/libxml/sax_callbacks.rb
106 def on_error(error)
107   STDOUT << "on_error" << "\n"
108             "  error " << error << "\n"
109   STDOUT.flush
110 end
on_external_subset(name, external_id, system_id) click to toggle source

Called for an external subset event.

    # File lib/libxml/sax_callbacks.rb
113 def on_external_subset(name, external_id, system_id)
114   STDOUT << "on_external_subset" << "\n"
115             "  external_id " << external_id << "\n" <<
116             "  system_id   " << system_id << "\n"
117   STDOUT.flush
118 end
on_has_external_subset() click to toggle source

Called for an external subset notification event.

    # File lib/libxml/sax_callbacks.rb
121 def on_has_external_subset
122   STDOUT << "on_has_internal_subset\n"
123   STDOUT.flush
124 end
on_has_internal_subset() click to toggle source

Called for an internal subset notification event.

    # File lib/libxml/sax_callbacks.rb
127 def on_has_internal_subset
128   STDOUT << "on_has_internal_subset\n"
129   STDOUT.flush
130 end
on_internal_subset(name, external_id, system_id) click to toggle source

Called for an internal subset event.

    # File lib/libxml/sax_callbacks.rb
133 def on_internal_subset(name, external_id, system_id)
134   STDOUT << "on_internal_subset" << "\n"
135             "  external_id " << external_id << "\n" <<
136             "  system_id   " << system_id << "\n"
137   STDOUT.flush
138 end
on_is_standalone() click to toggle source

Called for ‘is standalone’ event.

    # File lib/libxml/sax_callbacks.rb
141 def on_is_standalone
142   STDOUT << "on_is_standalone\n"
143   STDOUT.flush
144 end
on_processing_instruction(target, data) click to toggle source

Called for an processing instruction event.

    # File lib/libxml/sax_callbacks.rb
147 def on_processing_instruction(target, data)
148   STDOUT << "on_characters" << "\n"
149             "  target: " << target << "\n" <<
150             "  data:   " << data << "\n"
151   STDOUT.flush
152 end
on_reference(name) click to toggle source

Called for a reference event.

    # File lib/libxml/sax_callbacks.rb
155 def on_reference(name)
156   STDOUT << "on_reference:" << "\n" <<
157             "  name:" << name << "\n"
158   STDOUT.flush
159 end
on_start_document() click to toggle source

Called for a start document event.

    # File lib/libxml/sax_callbacks.rb
162 def on_start_document
163   STDOUT << "on_start_document\n"
164   STDOUT.flush
165 end
on_start_element_ns(name, attributes, prefix, uri, namespaces) click to toggle source

Called for a start element event.

    # File lib/libxml/sax_callbacks.rb
168 def on_start_element_ns(name, attributes, prefix, uri, namespaces)
169   STDOUT << "on_start_element_ns" << "\n" <<
170             "  name: " << name << "\n" <<
171             "  attr: " << (attributes || Hash.new).inspect << "\n" <<
172             "  prefix: " << prefix << "\n" <<
173             "  uri: " << uri << "\n" <<
174             "  ns_defs: " << (namespaces || Hash.new).inspect << "\n"
175   STDOUT.flush
176 end