Sha256: ff0c2083cad088c6bc9a54e7542cf2d7f18bd0184f663a228000305ef5af80cf

Contents?: true

Size: 1.79 KB

Versions: 30

Compression:

Stored size: 1.79 KB

Contents

/* Please see the LICENSE file for copyright and distribution information */

#include "ruby_libxml.h"

/* Document-class: LibXML::XML::HTMLParser::Options
 *
 * Options to control the operation of the HTMLParser.  The easiest
 * way to set a parser's options is via the methods
 * XML::HTMLParser.file, XML::HTMLParser.io or XML::HTMLParser.string.
 * For additional control, see XML::HTMLParser::Context#options=.
*/

VALUE mXMLHtmlParserOptions;

void rxml_init_html_parser_options(void)
{
  mXMLHtmlParserOptions = rb_define_module_under(cXMLHtmlParser, "Options");


#if LIBXML_VERSION >= 20621
  /* 1: Relax parsing. */
  rb_define_const(mXMLHtmlParserOptions, "RECOVER", INT2NUM(HTML_PARSE_RECOVER)); 
#endif
#if LIBXML_VERSION >= 20708
  /* 2:  Do not default a doctype if not found */
  rb_define_const(mXMLHtmlParserOptions, "NODEFDTD", INT2NUM(HTML_PARSE_NODEFDTD));
#endif
  /* 32: Suppress error reports. */
  rb_define_const(mXMLHtmlParserOptions, "NOERROR", INT2NUM(HTML_PARSE_NOERROR)); 
  /* 64: Suppress warning reports. */
  rb_define_const(mXMLHtmlParserOptions, "NOWARNING", INT2NUM(HTML_PARSE_NOWARNING));
  /* 128: Enable pedantic error reporting. */
  rb_define_const(mXMLHtmlParserOptions, "PEDANTIC", INT2NUM(HTML_PARSE_PEDANTIC)); 
  /* 256: Remove blank nodes. */
  rb_define_const(mXMLHtmlParserOptions, "NOBLANKS", INT2NUM(HTML_PARSE_NOBLANKS)); 
#if LIBXML_VERSION >= 20621
  /* 2048: Forbid network access. */
  rb_define_const(mXMLHtmlParserOptions, "NONET", INT2NUM(HTML_PARSE_NONET)); 
  /* 65536: Compact small text nodes. */
  rb_define_const(mXMLHtmlParserOptions, "COMPACT", INT2NUM(HTML_PARSE_COMPACT));
#endif
#if LIBXML_VERSION >= 20707
  /* 8192:  Do not add implied html/body... elements */
  rb_define_const(mXMLHtmlParserOptions, "NOIMPLIED", INT2NUM(HTML_PARSE_NOIMPLIED));
#endif
}

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
libxml-ruby-2.9.0-x64-mingw32 ext/libxml/ruby_xml_html_parser_options.c
libxml-ruby-2.9.0 ext/libxml/ruby_xml_html_parser_options.c
libxml-ruby-2.8.0 ext/libxml/ruby_xml_html_parser_options.c
libxml-ruby-2.7.0-x86-mingw32 ext/libxml/ruby_xml_html_parser_options.c
libxml-ruby-2.7.0 ext/libxml/ruby_xml_html_parser_options.c
libxml-ruby-2.6.0-x86-mingw32 ext/libxml/ruby_xml_html_parser_options.c
libxml-ruby-2.6.0 ext/libxml/ruby_xml_html_parser_options.c
libxml-ruby-2.5.0-x86-mingw32 ext/libxml/ruby_xml_html_parser_options.c
libxml-ruby-2.5.0 ext/libxml/ruby_xml_html_parser_options.c
libxml-ruby-2.4.0-x86-mingw32 ext/libxml/ruby_xml_html_parser_options.c
libxml-ruby-2.4.0 ext/libxml/ruby_xml_html_parser_options.c
libxml-ruby-2.3.3-x86-mingw32 ext/libxml/ruby_xml_html_parser_options.c
libxml-ruby-2.3.3 ext/libxml/ruby_xml_html_parser_options.c
libxml-ruby-2.3.2 ext/libxml/ruby_xml_html_parser_options.c
libxml-ruby-2.3.0-x86-mingw32 ext/libxml/ruby_xml_html_parser_options.c
libxml-ruby-2.3.0 ext/libxml/ruby_xml_html_parser_options.c
libxml-ruby-2.2.2-x86-mingw32 ext/libxml/ruby_xml_html_parser_options.c
libxml-ruby-2.2.2 ext/libxml/ruby_xml_html_parser_options.c
libxml-ruby-2.2.1-x86-mingw32 ext/libxml/ruby_xml_html_parser_options.c
libxml-ruby-2.2.1 ext/libxml/ruby_xml_html_parser_options.c