Install
sudo gem install nokogiri
Contribute
github.com/sparklemotion/nokogiri

An HTML, XML, SAX, & Reader parser with the ability to search documents via XPath or CSS3 selectors… and much more

Nokogiri

Class Nokogiri::XML::ParseOptions inherits from Object

Parse options for passing to Nokogiri.XML or Nokogiri.HTML

Constants

COMPACT

compact small text nodes; no modification of the tree allowed afterwards (will possibly crash if you try to modify the tree)

DEFAULT_HTML
DEFAULT_XML

the default options used for parsing XML documents

DTDATTR

Default DTD attributes

DTDLOAD

Load external subsets

DTDVALID

validate with the DTD

HUGE

relax any hardcoded limit from the parser

NOBASEFIX

do not fixup XINCLUDE xml:base uris

NOBLANKS

remove blank nodes

NOCDATA

merge CDATA as text nodes

NODICT

Do not reuse the context dictionary

NOENT

Substitute entities

NOERROR

suppress error reports

NONET

Forbid network access. Recommended for dealing with untrusted documents.

NOWARNING

suppress warning reports

NOXINCNODE

do not generate XINCLUDE START/END nodes

NSCLEAN

remove redundant namespaces declarations

OLD10

parse using XML-1.0 before update 5

PEDANTIC

pedantic error reporting

RECOVER

Recover from errors

SAX1

use the SAX1 interface internally

STRICT

Strict parsing

XINCLUDE

Implement XInclude substitution

Attributes

options RW
to_i RW

Public Class Methods

new(options = STRICT) Show Source
# File lib/nokogiri/xml/parse_options.rb, line 55 def initialize options = STRICT @options = options end

Public Instance Methods

inspect() Show Source
# File lib/nokogiri/xml/parse_options.rb, line 89 def inspect options = [] self.class.constants.each do |k| options << k.downcase if send(:"#{k.downcase}?") end super.sub(/>$/, " " + options.join(', ') + ">") end
strict() Show Source
# File lib/nokogiri/xml/parse_options.rb, line 78 def strict @options &= ~RECOVER self end
strict?() Show Source
# File lib/nokogiri/xml/parse_options.rb, line 83 def strict? @options & RECOVER == STRICT end