Server IP : 66.29.132.122 / Your IP : 18.119.127.230 Web Server : LiteSpeed System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : admazpex ( 531) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/proc/self/root/proc/thread-self/root/proc/self/root/proc/self/root/proc/self/root/opt/alt/ruby21/lib64/ruby/2.1.0/rexml/parsers/ |
Upload File : |
require "rexml/parsers/baseparser" module REXML module Parsers class StreamParser def initialize source, listener @listener = listener @parser = BaseParser.new( source ) end def add_listener( listener ) @parser.add_listener( listener ) end def parse # entity string while true event = @parser.pull case event[0] when :end_document return when :start_element attrs = event[2].each do |n, v| event[2][n] = @parser.unnormalize( v ) end @listener.tag_start( event[1], attrs ) when :end_element @listener.tag_end( event[1] ) when :text normalized = @parser.unnormalize( event[1] ) @listener.text( normalized ) when :processing_instruction @listener.instruction( *event[1,2] ) when :start_doctype @listener.doctype( *event[1..-1] ) when :end_doctype # FIXME: remove this condition for milestone:3.2 @listener.doctype_end if @listener.respond_to? :doctype_end when :comment, :attlistdecl, :cdata, :xmldecl, :elementdecl @listener.send( event[0].to_s, *event[1..-1] ) when :entitydecl, :notationdecl @listener.send( event[0].to_s, event[1..-1] ) when :externalentity entity_reference = event[1] content = entity_reference.gsub(/\A%|;\z/, "") @listener.entity(content) end end end end end end