Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • xsd/xmlparser/parser.rb

Class/Module Index [+]

Quicksearch

XSD::XMLParser::Parser

Attributes

charset[RW]

Public Class Methods

add_factory(factory) click to toggle source
 
               # File xsd/xmlparser/parser.rb, line 36
def self.add_factory(factory)
  if $DEBUG
    puts "Set #{ factory } as XML processor."
  end
  @@parser_factory = factory
end
            
create_parser(host, opt = {}) click to toggle source
 
               # File xsd/xmlparser/parser.rb, line 32
def self.create_parser(host, opt = {})
  @@parser_factory.new(host, opt)
end
            
factory() click to toggle source
 
               # File xsd/xmlparser/parser.rb, line 28
def self.factory
  @@parser_factory
end
            
new(host, opt = {}) click to toggle source
 
               # File xsd/xmlparser/parser.rb, line 47
def initialize(host, opt = {})
  @host = host
  @charset = opt[:charset] || nil
end
            

Public Instance Methods

parse(string_or_readable) click to toggle source
 
               # File xsd/xmlparser/parser.rb, line 52
def parse(string_or_readable)
  @textbuf = ''
  prologue
  do_parse(string_or_readable)
  epilogue
end