Sha256: e7e38a3c6f1a2a97e0152e3231397c0962e8e871afc1b10df28d48d2c07d8ca2
Contents?: true
Size: 778 Bytes
Versions: 14
Compression:
Stored size: 778 Bytes
Contents
module Nokogiri module XML module SAX class Parser attr_accessor :document def initialize(doc = XML::SAX::Document.new) @document = doc end ### # Parse given +thing+ which may be a string containing xml, or an # IO object. def parse thing parse_memory(thing.is_a?(IO) ? thing.read : thing) end ### # Parse given +io+ def parse_io io parse_memory io.read end ### # Parse a file with +filename+ def parse_file filename raise Errno::ENOENT unless File.exists?(filename) raise Errno::EISDIR if File.directory?(filename) native_parse_file filename end end end end end
Version data entries
14 entries across 14 versions & 2 rubygems