Class LibXML::XML::Parser
In: lib/libxml/parser.rb
Parent: Object

Methods

Public Class methods

Creates a new parser for the specified document.

Parameters:

 document - A preparsed document.

Creates a new parser for the specified file or uri.

You may provide an optional hash table to control how the parsing is performed. Valid options are:

 encoding - The document encoding, defaults to nil. Valid values
            are the encoding constants defined on XML::Encoding.
 options - Parser options.  Valid values are the constants defined on
           XML::Parser::Options.  Mutliple options can be combined
           by using Bitwise OR (|).

Creates a new parser for the specified io object.

Parameters:

 io - io object that contains the xml to parser
 base_uri - The base url for the parsed document.
 encoding - The document encoding, defaults to nil. Valid values
            are the encoding constants defined on XML::Encoding.
 options - Parser options.  Valid values are the constants defined on
           XML::Parser::Options.  Mutliple options can be combined
           by using Bitwise OR (|).

Creates a new parser by parsing the specified string.

You may provide an optional hash table to control how the parsing is performed. Valid options are:

 base_uri - The base url for the parsed document.
 encoding - The document encoding, defaults to nil. Valid values
            are the encoding constants defined on XML::Encoding.
 options - Parser options.  Valid values are the constants defined on
           XML::Parser::Options.  Mutliple options can be combined
           by using Bitwise OR (|).

[Validate]