Class | XSD::XMLParser::Parser
In: | xsd/xmlparser/parser.rb
Parent: | Object

### Methods

add_factory create_parser factory new parse

### Classes and Modules

Class XSD::XMLParser::Parser::ElementConstraintError
Class XSD::XMLParser::Parser::FormatDecodeError
Class XSD::XMLParser::Parser::ParseError
Class XSD::XMLParser::Parser::UnexpectedElementError
Class XSD::XMLParser::Parser::UnknownAttributeError
Class XSD::XMLParser::Parser::UnknownElementError

### Attributes

charset | [RW] |

### Public Class methods

add_factory(factory)

[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 = {})

[Source]

    # File xsd/xmlparser/parser.rb, line 32
      def self.create_parser(host, opt = {})
        @@parser_factory.new(host, opt)
      end

factory()

[Source]

    # File xsd/xmlparser/parser.rb, line 28
      def self.factory
        @@parser_factory
      end

new(host, opt = {})

[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)

[Source]

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

[Validate]