Class: Nokogiri::XML::Schema

Class | Nokogiri::XML::Schema
In: | lib/nokogiri/ffi/xml/schema.rb lib/nokogiri/xml/schema.rb ext/nokogiri/html_document.c
Parent: | Object

call-seq:

     from_document(doc)

Create a new Schema from the Nokogiri::XML::Document `doc`

### Methods

from_document new read_memory valid? validate validate_document

### Attributes

errors | [RW] | Errors while parsing the schema file

### Public Class methods

from_document(doc)

Create a new Schema from the Nokogiri::XML::Document `doc`

new(string_or_io)

Create a new Nokogiri::XML::Schema object using a `string_or_io` object.

read_memory(string)

Create a new Schema from the contents of `string`

### Public Instance methods

valid?(thing)

Returns true if `thing` is a valid Nokogiri::XML::Document or file.

validate(thing)

Validate `thing` against this schema. `thing` can be a Nokogiri::XML::Document object, or a filename. An Array of Nokogiri::XML::SyntaxError objects found while validating the `thing` is returned.

validate_document(document)

Validate a Nokogiri::XML::Document against this Schema.

[Validate]