Sha256: b0ab1f4db7d7310a075759ed262eefc4e54bdc2a4f1b2a0da6307ada6016a34a

Contents?: true

Size: 1.22 KB

Versions: 393

Compression:

Stored size: 1.22 KB

Contents

# frozen_string_literal: true

module Nokogiri
  module XML
    class << self
      ###
      # Create a new Nokogiri::XML::RelaxNG document from +string_or_io+.
      # See Nokogiri::XML::RelaxNG for an example.
      def RelaxNG(string_or_io, options = ParseOptions::DEFAULT_SCHEMA)
        RelaxNG.new(string_or_io, options)
      end
    end

    ###
    # Nokogiri::XML::RelaxNG is used for validating XML against a
    # RelaxNG schema.
    #
    # == Synopsis
    #
    # Validate an XML document against a RelaxNG schema.  Loop over the errors
    # that are returned and print them out:
    #
    #   schema  = Nokogiri::XML::RelaxNG(File.open(ADDRESS_SCHEMA_FILE))
    #   doc     = Nokogiri::XML(File.open(ADDRESS_XML_FILE))
    #
    #   schema.validate(doc).each do |error|
    #     puts error.message
    #   end
    #
    # The list of errors are Nokogiri::XML::SyntaxError objects.
    #
    # NOTE: RelaxNG input is always treated as TRUSTED documents, meaning that they will cause the
    # underlying parsing libraries to access network resources. This is counter to Nokogiri's
    # "untrusted by default" security policy, but is a limitation of the underlying libraries.
    class RelaxNG < Nokogiri::XML::Schema
    end
  end
end

Version data entries

393 entries across 391 versions & 11 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/nokogiri-1.16.6-x86_64-linux/lib/nokogiri/xml/relax_ng.rb
nokogiri-1.15.7-x86-mingw32 lib/nokogiri/xml/relax_ng.rb
nokogiri-1.15.7-x86-linux lib/nokogiri/xml/relax_ng.rb
nokogiri-1.15.7-x86_64-linux lib/nokogiri/xml/relax_ng.rb
nokogiri-1.15.7-x86_64-darwin lib/nokogiri/xml/relax_ng.rb
nokogiri-1.15.7-x64-mingw-ucrt lib/nokogiri/xml/relax_ng.rb
nokogiri-1.15.7-x64-mingw32 lib/nokogiri/xml/relax_ng.rb
nokogiri-1.15.7-java lib/nokogiri/xml/relax_ng.rb
nokogiri-1.15.7 lib/nokogiri/xml/relax_ng.rb
nokogiri-1.15.7-arm-linux lib/nokogiri/xml/relax_ng.rb
nokogiri-1.15.7-arm64-darwin lib/nokogiri/xml/relax_ng.rb
nokogiri-1.15.7-aarch64-linux lib/nokogiri/xml/relax_ng.rb
nokogiri-1.16.8-x86-mingw32 lib/nokogiri/xml/relax_ng.rb
nokogiri-1.16.8-x86-linux lib/nokogiri/xml/relax_ng.rb
nokogiri-1.16.8-x86_64-linux lib/nokogiri/xml/relax_ng.rb
nokogiri-1.16.8-x86_64-darwin lib/nokogiri/xml/relax_ng.rb
nokogiri-1.16.8-x64-mingw-ucrt lib/nokogiri/xml/relax_ng.rb
nokogiri-1.16.8-x64-mingw32 lib/nokogiri/xml/relax_ng.rb
nokogiri-1.16.8-java lib/nokogiri/xml/relax_ng.rb
nokogiri-1.16.8 lib/nokogiri/xml/relax_ng.rb