$34 GRAYBYTE WORDPRESS FILE MANAGER $28

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

/opt/alt/ruby25/lib64/ruby/2.5.0/rexml/parsers/

HOME
Current File : /opt/alt/ruby25/lib64/ruby/2.5.0/rexml/parsers//lightparser.rb
# frozen_string_literal: false
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 :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.47 PM
root / linksafe
0755
baseparser.rb
25.605 KB
5 Apr 2021 11.46 AM
root / linksafe
0644
lightparser.rb
1.546 KB
5 Apr 2021 11.46 AM
root / linksafe
0644
pullparser.rb
5.114 KB
5 Apr 2021 11.46 AM
root / linksafe
0644
sax2parser.rb
9.067 KB
5 Apr 2021 11.46 AM
root / linksafe
0644
streamparser.rb
1.926 KB
5 Apr 2021 11.46 AM
root / linksafe
0644
treeparser.rb
3.482 KB
5 Apr 2021 11.46 AM
root / linksafe
0644
ultralightparser.rb
1.454 KB
5 Apr 2021 11.46 AM
root / linksafe
0644
xpathparser.rb
17.934 KB
5 Apr 2021 11.46 AM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF