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

In case someone passes us a node. ugh.

### Methods

from_document new read_memory valid? validate validate_document validate_file

### 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_file(filename)

Validate a file against this Schema.

[Validate]