Sha256: 0f4bdad5d2af5a99741bb7ad196ae5f96d9973b83a7e1d9a24282d9b5e53d703

Contents?: true

Size: 878 Bytes

Versions: 8

Compression:

Stored size: 878 Bytes

Contents

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
        RelaxNG.new(string_or_io)
      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.read(ADDRESS_SCHEMA_FILE))
    #   doc     = Nokogiri::XML(File.read(ADDRESS_XML_FILE))
    #
    #   schema.validate(doc).each do |error|
    #     puts error.message
    #   end
    #
    # The list of errors are Nokogiri::XML::SyntaxError objects.
    class RelaxNG < Nokogiri::XML::Schema
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
nokogiri-1.3.0-x86-mingw32 lib/nokogiri/xml/relax_ng.rb
nokogiri-1.3.0-java lib/nokogiri/xml/relax_ng.rb
nokogiri-1.3.1-java lib/nokogiri/xml/relax_ng.rb
nokogiri-1.3.0 lib/nokogiri/xml/relax_ng.rb
nokogiri-1.3.0-x86-mswin32 lib/nokogiri/xml/relax_ng.rb
nokogiri-1.3.1-x86-mingw32 lib/nokogiri/xml/relax_ng.rb
nokogiri-1.3.1-x86-mswin32 lib/nokogiri/xml/relax_ng.rb
nokogiri-1.3.1 lib/nokogiri/xml/relax_ng.rb