class LibXML::XML::SaxParser

def self.file(path)

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

XML::SaxParser.file(path) -> XML::SaxParser
call-seq:
def self.file(path)
  context = XML::Parser::Context.file(path)
  self.new(context)
end

def self.io(io, options = {})

are the encoding constants defined on XML::Encoding.
encoding - The document encoding, defaults to nil. Valid values

Parameters:

Creates a new reader by parsing the specified io object.

XML::SaxParser.io(io, :encoding => XML::Encoding::UTF_8) -> XML::SaxParser
XML::SaxParser.io(io) -> XML::SaxParser
call-seq:
def self.io(io, options = {})
  context = XML::Parser::Context.io(io)
  context.encoding = options[:encoding] if options[:encoding]
  self.new(context)
end

def self.string(string)

Creates a new parser by parsing the specified string.

XML::SaxParser.string(string)
call-seq:
def self.string(string)
  context = XML::Parser::Context.string(string)
  self.new(context)
end