Install
sudo gem install nokogiri
Contribute
github.com/tenderlove/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

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

NOBLANKS

remove blank nodes

NOCDATA

merge CDATA as text nodes

NODICT

Do not reuse the context dictionnary

NOENT

Substitute entities

NOERROR

suppress error reports

NONET

Forbid network access

NOWARNING

suppress warning reports

NOXINCNODE

do not generate XINCLUDE START/END nodes

NSCLEAN

remove redundant namespaces declarations

PEDANTIC

pedantic error reporting

RECOVER

Recover from errors

SAX1

use the SAX1 interface internally

STRICT

Strict parsing

XINCLUDE

Implement XInclude substitition

Attributes

options RW

Public Class Methods

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

Public Instance Methods

inspect() Show Source
# File lib/nokogiri/xml/parse_options.rb, line 76 76: def inspect 77: options = [] 78: self.class.constants.each do |k| 79: options << k.downcase if send(:"#{k.downcase}?") 80: end 81: super.sub(/>$/, " " + options.join(', ') + ">") 82: end
strict() Show Source
# File lib/nokogiri/xml/parse_options.rb, line 65 65: def strict 66: @options &= ~RECOVER 67: self 68: end
strict?() Show Source
# File lib/nokogiri/xml/parse_options.rb, line 70 70: def strict? 71: @options & RECOVER == STRICT 72: end