/usr/lib/ruby/vendor_ruby/multi_xml/parsers/nokogiri.rb is in ruby-multi-xml 0.5.4-0ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | require 'nokogiri' unless defined?(Nokogiri)
require 'multi_xml/parsers/libxml2_parser'
module MultiXml
module Parsers
module Nokogiri #:nodoc:
include Libxml2Parser
extend self
def parse_error() ::Nokogiri::XML::SyntaxError end
def parse(xml)
doc = ::Nokogiri::XML(xml)
raise doc.errors.first if doc.errors.length > 0
node_to_hash(doc.root)
end
def each_child(node, &block)
node.children.each(&block)
end
def each_attr(node, &block)
node.attribute_nodes.each(&block)
end
def node_name(node)
node.node_name
end
end
end
end
|