class Nokogiri::XML::SAX::Parser
def initialize(doc = XML::SAX::Document.new)
def initialize(doc = XML::SAX::Document.new) @document = doc end
def parse thing
Parse given +thing+ which may be a string containing xml, or an
##
def parse thing parse_memory(thing.is_a?(IO) ? thing.read : thing) end
def parse_file filename
##
def parse_file filename raise Errno::ENOENT unless File.exists?(filename) raise Errno::EISDIR if File.directory?(filename) native_parse_file filename end
def parse_io io
##
def parse_io io parse_memory io.read end