Method: LibXML::XML::Document#debug

Defined in:
ext/libxml/ruby_xml_document.c

#debugObject

Print libxml debugging information to stdout. Requires that libxml was compiled with debugging enabled.



310
311
312
313
314
315
316
317
318
319
320
321
# File 'ext/libxml/ruby_xml_document.c', line 310

static VALUE rxml_document_debug(VALUE self)
{
#ifdef LIBXML_DEBUG_ENABLED
  xmlDocPtr xdoc;
  Data_Get_Struct(self, xmlDoc, xdoc);
  xmlDebugDumpDocument(NULL, xdoc);
  return Qtrue;
#else
  rb_warn("libxml was compiled without debugging support.")
  return Qfalse;
#endif
}