### Home Classes Methods

### In Files

- lib/nokogiri/xml/parse_options.rb

### Parent

Object

### Methods

- ::new
- #inspect
- #strict
- #strict?

### Files

- CHANGELOG.ja.rdoc
- CHANGELOG.rdoc
- C_CODING_STYLE.rdoc
- Manifest.txt
- README.ja.rdoc
- README.rdoc

### Class/Module Index

Quicksearch

- Nokogiri
- Nokogiri::CSS
- Nokogiri::CSS::Node
- Nokogiri::CSS::Parser
- Nokogiri::CSS::SyntaxError
- Nokogiri::CSS::Tokenizer
- Nokogiri::CSS::Tokenizer::ScanError
- Nokogiri::Decorators
- Nokogiri::Decorators::Slop
- Nokogiri::EncodingHandler
- Nokogiri::HTML
- Nokogiri::HTML::Builder
- Nokogiri::HTML::Document
- Nokogiri::HTML::Document::EncodingReader
- Nokogiri::HTML::Document::EncodingReader::JumpSAXHandler
- Nokogiri::HTML::DocumentFragment
- Nokogiri::HTML::ElementDescription
- Nokogiri::HTML::EntityDescription
- Nokogiri::HTML::EntityLookup
- Nokogiri::HTML::SAX
- Nokogiri::HTML::SAX::Parser
- Nokogiri::HTML::SAX::ParserContext
- Nokogiri::HTML::SAX::PushParser
- Nokogiri::SyntaxError
- Nokogiri::XML
- Nokogiri::XML::Attr
- Nokogiri::XML::AttributeDecl
- Nokogiri::XML::Builder
- Nokogiri::XML::CDATA
- Nokogiri::XML::CharacterData
- Nokogiri::XML::Comment
- Nokogiri::XML::DTD
- Nokogiri::XML::Document
- Nokogiri::XML::DocumentFragment
- Nokogiri::XML::Element
- Nokogiri::XML::ElementContent
- Nokogiri::XML::ElementDecl
- Nokogiri::XML::EntityDecl
- Nokogiri::XML::EntityReference
- Nokogiri::XML::Namespace
- Nokogiri::XML::Node
- Nokogiri::XML::Node::SaveOptions
- Nokogiri::XML::NodeSet
- Nokogiri::XML::Notation
- Nokogiri::XML::PP
- Nokogiri::XML::PP::CharacterData
- Nokogiri::XML::PP::Node
- Nokogiri::XML::ParseOptions
- Nokogiri::XML::ProcessingInstruction
- Nokogiri::XML::Reader
- Nokogiri::XML::RelaxNG
- Nokogiri::XML::SAX
- Nokogiri::XML::SAX::Document
- Nokogiri::XML::SAX::Parser
- Nokogiri::XML::SAX::Parser::Attribute
- Nokogiri::XML::SAX::ParserContext
- Nokogiri::XML::SAX::PushParser
- Nokogiri::XML::Schema
- Nokogiri::XML::SyntaxError
- Nokogiri::XML::Text
- Nokogiri::XML::XPath
- Nokogiri::XML::XPath::SyntaxError
- Nokogiri::XML::XPathContext
- Nokogiri::XSLT
- Nokogiri::XSLT::Stylesheet
- XSD
- XSD::XMLParser
- XSD::XMLParser::Nokogiri
- Object

No matching classes.

# Nokogiri::XML::ParseOptions

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

  the default options used for parsing HTML documents

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) click to toggle source

    # File lib/nokogiri/xml/parse_options.rb, line 55
    def initialize options = STRICT
      @options = options
    end

### Public Instance Methods

inspect() click to toggle 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() click to toggle source

    # File lib/nokogiri/xml/parse_options.rb, line 78
    def strict
      @options &= ~RECOVER
      self
    end

strict?() click to toggle source

    # File lib/nokogiri/xml/parse_options.rb, line 83
    def strict?
      @options & RECOVER == STRICT
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.