Class | Nokogiri::XML::SAX::Parser
In: | lib/nokogiri/xml/sax/parser.rb ext/nokogiri/xml_sax_push_parser.c
Parent: | Object

end_element_ns was borrowed heavily from libxml-ruby.

### Methods

new parse parse_file parse_io parse_memory

### Classes and Modules

Class Nokogiri::XML::SAX::Parser::Attribute

### Constants

ENCODINGS

=

{ 'NONE' => 0, # No char encoding detected 'UTF-8' => 1, # UTF-8 'UTF16LE' => 2, # UTF-16 little endian 'UTF16BE' => 3, # UTF-16 big endian 'UCS4LE' => 4, # UCS-4 little endian 'UCS4BE' => 5, # UCS-4 big endian 'EBCDIC' => 6, # EBCDIC uh! 'UCS4-2143' => 7, # UCS-4 unusual ordering 'UCS4-3412' => 8, # UCS-4 unusual ordering 'UCS2' => 9, # UCS-2 'ISO-8859-1' => 10, # ISO-8859-1 ISO Latin 1 'ISO-8859-2' => 11, # ISO-8859-2 ISO Latin 2 'ISO-8859-3' => 12, # ISO-8859-3 'ISO-8859-4' => 13, # ISO-8859-4 'ISO-8859-5' => 14, # ISO-8859-5 'ISO-8859-6' => 15, # ISO-8859-6 'ISO-8859-7' => 16, # ISO-8859-7 'ISO-8859-8' => 17, # ISO-8859-8 'ISO-8859-9' => 18, # ISO-8859-9 'ISO-2022-JP' => 19, # ISO-2022-JP 'SHIFT-JIS' => 20, # Shift_JIS 'EUC-JP' => 21, # EUC-JP 'ASCII' => 22, # pure ASCII }

Encodinds this parser supports

### Attributes

document | [RW] | The Nokogiri::XML::SAX::Document where events will be sent.
encoding | [RW] | The encoding beings used for this document.

### Public Class methods

new(doc = Nokogiri::XML::SAX::Document.new, encoding = 'UTF-8')

Create a new Parser with `doc` and `encoding`

### Public Instance methods

parse(thing, &block)

Parse given `thing` which may be a string containing xml, or an IO object.

parse_file(filename) {|ctx if block_given?| ...}

Parse a file with `filename`

parse_io(io, encoding = 'ASCII') {|ctx if block_given?| ...}

Parse given `io`

parse_memory(data) {|ctx if block_given?| ...}

[Validate]