$92 GRAYBYTE WORDPRESS FILE MANAGER $39

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.157
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/cpanel/ea-ruby27/root/usr/share/ruby/ruby-2.7.8/rexml/parsers/

HOME
Current File : /opt/cpanel/ea-ruby27/root/usr/share/ruby/ruby-2.7.8/rexml/parsers//ultralightparser.rb
# frozen_string_literal: false
require_relative 'streamparser'
require_relative 'baseparser'

module REXML
  module Parsers
    class UltraLightParser
      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 = []
        while true
          event = @parser.pull
          case event[0]
          when :end_document
            break
          when :end_doctype
            context = context[1]
          when :start_element, :start_doctype
            context << event
            event[1,0] = [context]
            context = event
          when :end_element
            context = context[1]
          else
            context << event
          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
..
--
21 Mar 2024 10.21 AM
root / root
0755
baseparser.rb
25.096 KB
30 Mar 2023 12.34 PM
root / root
0644
lightparser.rb
1.542 KB
30 Mar 2023 12.34 PM
root / root
0644
pullparser.rb
5.121 KB
30 Mar 2023 12.34 PM
root / root
0644
sax2parser.rb
9.08 KB
30 Mar 2023 12.34 PM
root / root
0644
streamparser.rb
1.921 KB
30 Mar 2023 12.34 PM
root / root
0644
treeparser.rb
3.494 KB
30 Mar 2023 12.34 PM
root / root
0644
ultralightparser.rb
1.444 KB
30 Mar 2023 12.34 PM
root / root
0644
xpathparser.rb
18.456 KB
30 Mar 2023 12.34 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF