Methods

Nori::Parser

Nori::Parser

Manages the parser classes. Currently supports:

Constants

DEFAULT

The default parser.

PARSERS

List of available parsers.

Public Class Methods

parse(xml, parser = nil) click to toggle source

Returns the parsed xml using the parser to use. Raises an ArgumentError unless the optional or default parser exists.

# File lib/nori/parser.rb, line 30
def self.parse(xml, parser = nil)
  load_parser(parser).parse xml
end
use() click to toggle source

Returns the parser to use. Defaults to Nori::Parser::REXML.

# File lib/nori/parser.rb, line 18
def self.use
  @use ||= DEFAULT
end
use=(parser) click to toggle source

Sets the parser to use. Raises an ArgumentError unless the parser exists.

# File lib/nori/parser.rb, line 23
def self.use=(parser)
  validate_parser! parser
  @use = parser
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.