lib/nori/parser/rexml.rb in nori-1.1.5 vs lib/nori/parser/rexml.rb in nori-2.0.0
- old
+ new
@@ -1,16 +1,16 @@
require "rexml/parsers/baseparser"
-module Nori
+class Nori
module Parser
# = Nori::Parser::REXML
#
# REXML pull parser.
module REXML
- def self.parse(xml, nori)
+ def self.parse(xml, options)
stack = []
parser = ::REXML::Parsers::BaseParser.new(xml)
while true
event = parser.pull
@@ -18,10 +18,10 @@
when :end_document
break
when :end_doctype, :start_doctype
# do nothing
when :start_element
- stack.push Nori::XMLUtilityNode.new(nori, event[1], event[2])
+ stack.push Nori::XMLUtilityNode.new(options, event[1], event[2])
when :end_element
if stack.size > 1
temp = stack.pop
stack.last.add_node(temp)
end