Class: LibXML::XML::SaxParser

### Home Classes Methods

### In Files

- lib/libxml/sax_callbacks.rb
- lib/libxml/sax_parser.rb

### Parent

Object

### Namespace

- MODULE LibXML::XML::SaxParser::Callbacks
- MODULE LibXML::XML::SaxParser::VerboseCallbacks

### Methods

- ::file
- ::io
- ::string

### Class/Module Index

Quicksearch

- LibXML
- LibXML::XML
- LibXML::XML::Attr
- LibXML::XML::AttrDecl
- LibXML::XML::Attributes
- LibXML::XML::Document
- LibXML::XML::Error
- LibXML::XML::HTMLParser
- LibXML::XML::Namespace
- LibXML::XML::Namespaces
- LibXML::XML::Node
- LibXML::XML::Parser
- LibXML::XML::Reader
- LibXML::XML::SaxParser
- LibXML::XML::SaxParser::Callbacks
- LibXML::XML::SaxParser::VerboseCallbacks
- LibXML::XML::Schema
- LibXML::XML::Schema::Attribute
- LibXML::XML::Schema::Element
- LibXML::XML::Schema::Namespaces
- LibXML::XML::Schema::Type
- LibXML::XML::Schema::Types
- LibXML::XML::XPath
- LibXML::XML::XPath::Object
- Object

No matching classes.

# LibXML::XML::SaxParser

### Public Class Methods

XML::SaxParser.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 9
    def self.file(path)
      context = XML::Parser::Context.file(path)
      self.new(context)
    end

XML::SaxParser.io(io) → XML::SaxParser click to toggle source
XML::SaxParser.io(io, :encoding => XML::Encoding::UTF_8) → XML::SaxParser

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 24
    def self.io(io, options = {})
      context = XML::Parser::Context.io(io)
      context.encoding = options[:encoding] if options[:encoding]
      self.new(context)
    end

XML::SaxParser.string(string) click to toggle source

Creates a new parser by parsing the specified string.

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.