Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../opt/alt/ruby27/share/ruby/rss
File: xmlparser.rb
# frozen_string_literal: false
[0] Fix | Delete
begin
[1] Fix | Delete
require "xml/parser"
[2] Fix | Delete
rescue LoadError
[3] Fix | Delete
require "xmlparser"
[4] Fix | Delete
end
[5] Fix | Delete
[6] Fix | Delete
begin
[7] Fix | Delete
require "xml/encoding-ja"
[8] Fix | Delete
rescue LoadError
[9] Fix | Delete
require "xmlencoding-ja"
[10] Fix | Delete
if defined?(Kconv)
[11] Fix | Delete
module XMLEncoding_ja
[12] Fix | Delete
class SJISHandler
[13] Fix | Delete
include Kconv
[14] Fix | Delete
end
[15] Fix | Delete
end
[16] Fix | Delete
end
[17] Fix | Delete
end
[18] Fix | Delete
[19] Fix | Delete
module XML
[20] Fix | Delete
class Parser
[21] Fix | Delete
unless defined?(Error)
[22] Fix | Delete
# This error is legacy, so we just set it to the new one
[23] Fix | Delete
Error = ::XMLParserError # :nodoc:
[24] Fix | Delete
end
[25] Fix | Delete
end
[26] Fix | Delete
end
[27] Fix | Delete
[28] Fix | Delete
module RSS
[29] Fix | Delete
[30] Fix | Delete
class REXMLLikeXMLParser < ::XML::Parser
[31] Fix | Delete
[32] Fix | Delete
include ::XML::Encoding_ja
[33] Fix | Delete
[34] Fix | Delete
def listener=(listener)
[35] Fix | Delete
@listener = listener
[36] Fix | Delete
end
[37] Fix | Delete
[38] Fix | Delete
def startElement(name, attrs)
[39] Fix | Delete
@listener.tag_start(name, attrs)
[40] Fix | Delete
end
[41] Fix | Delete
[42] Fix | Delete
def endElement(name)
[43] Fix | Delete
@listener.tag_end(name)
[44] Fix | Delete
end
[45] Fix | Delete
[46] Fix | Delete
def character(data)
[47] Fix | Delete
@listener.text(data)
[48] Fix | Delete
end
[49] Fix | Delete
[50] Fix | Delete
def xmlDecl(version, encoding, standalone)
[51] Fix | Delete
@listener.xmldecl(version, encoding, standalone == 1)
[52] Fix | Delete
end
[53] Fix | Delete
[54] Fix | Delete
def processingInstruction(target, content)
[55] Fix | Delete
@listener.instruction(target, content)
[56] Fix | Delete
end
[57] Fix | Delete
[58] Fix | Delete
end
[59] Fix | Delete
[60] Fix | Delete
class XMLParserParser < BaseParser
[61] Fix | Delete
[62] Fix | Delete
class << self
[63] Fix | Delete
def listener
[64] Fix | Delete
XMLParserListener
[65] Fix | Delete
end
[66] Fix | Delete
end
[67] Fix | Delete
[68] Fix | Delete
private
[69] Fix | Delete
def _parse
[70] Fix | Delete
begin
[71] Fix | Delete
parser = REXMLLikeXMLParser.new
[72] Fix | Delete
parser.listener = @listener
[73] Fix | Delete
parser.parse(@rss)
[74] Fix | Delete
rescue ::XML::Parser::Error => e
[75] Fix | Delete
raise NotWellFormedError.new(parser.line){e.message}
[76] Fix | Delete
end
[77] Fix | Delete
end
[78] Fix | Delete
[79] Fix | Delete
end
[80] Fix | Delete
[81] Fix | Delete
class XMLParserListener < BaseListener
[82] Fix | Delete
[83] Fix | Delete
include ListenerMixin
[84] Fix | Delete
[85] Fix | Delete
def xmldecl(version, encoding, standalone)
[86] Fix | Delete
super
[87] Fix | Delete
# Encoding is converted to UTF-8 when XMLParser parses XML.
[88] Fix | Delete
@encoding = 'UTF-8'
[89] Fix | Delete
end
[90] Fix | Delete
[91] Fix | Delete
end
[92] Fix | Delete
[93] Fix | Delete
end
[94] Fix | Delete
[95] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function