$54 GRAYBYTE WORDPRESS FILE MANAGER $79

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.23
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/ruby18/lib64/ruby/1.8/rexml/parsers/

HOME
Current File : /opt/alt/ruby18/lib64/ruby/1.8/rexml/parsers//lightparser.rb
require 'rexml/parsers/streamparser'
require 'rexml/parsers/baseparser'
require 'rexml/light/node'

module REXML
	module Parsers
		class LightParser
			def initialize stream
				@stream = stream
				@parser = REXML::Parsers::BaseParser.new( stream )
			end

      def add_listener( listener )
        @parser.add_listener( listener )
      end

      def rewind
        @stream.rewind
        @parser.stream = @stream
      end

			def parse
				root = context = [ :document ]
				while true
					event = @parser.pull
					case event[0]
					when :end_document
						break
					when :end_doctype
						context = context[1]
					when :start_element, :start_doctype
						new_node = event
						context << new_node
						new_node[1,0] = [context]
						context = new_node
					when :end_element, :end_doctype
						context = context[1]
					else
						new_node = event
						context << new_node
						new_node[1,0] = [context]
					end
				end
				root
			end
		end

		# An element is an array.  The array contains:
		#  0			The parent element
		#  1			The tag name
		#  2			A hash of attributes
		#  3..-1	The child elements
		# An element is an array of size > 3
		# Text is a String
		# PIs are [ :processing_instruction, target, data ]
		# Comments are [ :comment, data ]
		# DocTypes are DocType structs
		# The root is an array with XMLDecls, Text, DocType, Array, Text
	end
end


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.48 PM
root / linksafe
0755
baseparser.rb
18.641 KB
18 Apr 2008 7.22 AM
root / linksafe
0644
lightparser.rb
1.351 KB
12 Feb 2007 11.01 PM
root / linksafe
0644
pullparser.rb
5.085 KB
12 Feb 2007 11.01 PM
root / linksafe
0644
sax2parser.rb
7.494 KB
18 Apr 2008 7.22 AM
root / linksafe
0644
streamparser.rb
1.394 KB
12 Feb 2007 11.01 PM
root / linksafe
0644
treeparser.rb
3.369 KB
18 Apr 2008 7.22 AM
root / linksafe
0644
ultralightparser.rb
1.211 KB
12 Feb 2007 11.01 PM
root / linksafe
0644
xpathparser.rb
19.207 KB
18 Apr 2008 7.22 AM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF