Class: Nokogiri::XML::SAX::PushParser

Class | Nokogiri::XML::SAX::PushParser
In: | lib/nokogiri/ffi/xml/sax/push_parser.rb lib/nokogiri/xml/sax/push_parser.rb ext/nokogiri/xml_sax_parser.c
Parent: | Object

call-seq:

     initialize_native(xml_sax, filename)

Initialize the push parser with `xml_sax` using `filename`

### Methods

<< finish initialize_native native_write new write

### Included Modules

Nokogiri::XML::SAX::LegacyHandlers

### Attributes

document | [RW] | The Nokogiri::XML::SAX::Document on which the PushParser will be operating

### Public Class methods

new(doc = XML::SAX::Document.new, file_name = nil, encoding = 'ASCII')

Create a new PushParser with `doc` as the SAX Document, providing an optional `file_name` and `encoding`

### Public Instance methods

<<(chunk, last_chunk = false)

Alias for write

finish()

Finish the parsing. This method is only necessary for Nokogiri::XML::SAX::Document#end_document to be called.

initialize_native(xml_sax, filename)

Initialize the push parser with `xml_sax` using `filename`

native_write(chunk, last_chunk)

Write `chunk` to PushParser. `last_chunk` triggers the end_document handle

write(chunk, last_chunk = false)

Write a `chunk` of XML to the PushParser. Any callback methods that can be called will be called immidiately.

[Validate]