Parent

Methods

LibXML::XML::SaxParser

Public Class Methods

file(path) → XML::SaxParser click to toggle source

Creates a new parser by parsing the specified file or uri.

    # File lib/libxml/sax_parser.rb, line 10
10:       def self.file(path)
11:         context = XML::Parser::Context.file(path)
12:         self.new(context)
13:       end
io(io, :encoding => XML::Encoding::UTF_8) → XML::SaxParser click to toggle source

Creates a new reader by parsing the specified io object.

Parameters:

 encoding - The document encoding, defaults to nil. Valid values
            are the encoding constants defined on XML::Encoding.
    # File lib/libxml/sax_parser.rb, line 25
25:       def self.io(io, options = {})
26:         context = XML::Parser::Context.io(io)
27:         context.encoding = options[:encoding] if options[:encoding]
28:         self.new(context)
29:       end
string(string) click to toggle source

Creates a new parser by parsing the specified string.

    # File lib/libxml/sax_parser.rb, line 35
35:       def self.string(string)
36:         context = XML::Parser::Context.string(string)
37:         self.new(context)
38:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.