Module: Nokogiri::XML
Constant Summary
-
XML_C14N_1_0 =
Original C14N 1.0 spec canonicalization
0
-
XML_C14N_1_1 =
C14N 1.1 spec canonicalization
2
-
XML_C14N_EXCLUSIVE_1_0 =
Exclusive C14N 1.0 spec canonicalization
1
Class Method Summary
-
.fragment(string, options = ParseOptions::DEFAULT_XML, &block)
Parse a fragment from
string
in to aNodeSet
. -
.parse(thing, url = nil, encoding = nil, options = ParseOptions::DEFAULT_XML, &block)
Parse XML.
-
Reader(string_or_io, url = nil, encoding = nil, options = ParseOptions::STRICT) {|options| ... }
Parse an
XML
document using theReader
API. -
RelaxNg(input) → Nokogiri::XML::RelaxNG)
Parse a RELAX NG schema definition and create a new
Schema
object. - Schema(input) → Nokogiri::XML::Schema)
Class Method Details
.fragment(string, options = ParseOptions::DEFAULT_XML, &block)
Parse a fragment from string
in to a XML::NodeSet
.
# File 'lib/nokogiri/xml.rb', line 42
def fragment(string, = ParseOptions::DEFAULT_XML, &block) XML::DocumentFragment.parse(string, , &block) end
.parse(thing, url = nil, encoding = nil, options = ParseOptions::DEFAULT_XML, &block)
Parse XML. Convenience method for Document.parse
# File 'lib/nokogiri/xml.rb', line 36
def parse(thing, url = nil, encoding = nil, = ParseOptions::DEFAULT_XML, &block) Document.parse(thing, url, encoding, , &block) end
Reader(string_or_io, url = nil, encoding = nil, options = ParseOptions::STRICT) {|options| ... }
Parse an XML
document using the XML::Reader
API. See XML::Reader
for more information
# File 'lib/nokogiri/xml.rb', line 23
def Reader(string_or_io, url = nil, encoding = nil, = ParseOptions::STRICT) = Nokogiri::XML::ParseOptions.new( ) if Integer === yield if block_given? if string_or_io.respond_to?(:read) return Reader.from_io(string_or_io, url, encoding, .to_i) end Reader.from_memory(string_or_io, url, encoding, .to_i) end
RelaxNg(input) → Nokogiri::XML::RelaxNG)
RelaxNg(input, parse_options) → Nokogiri::XML::RelaxNG)
Parse a RELAX NG schema definition and create a new XML::Schema
object. This is a convenience method for RelaxNG.new
See related: RelaxNG.new
- Parameters
-
input
(String, IO) RELAX NG schema definition -
parse_options
(Nokogiri::XML::ParseOptions) Defaults to ParseOptions::DEFAULT_SCHEMA
- Returns
# File 'lib/nokogiri/xml/relax_ng.rb', line 22
def RelaxNG(input, = ParseOptions::DEFAULT_SCHEMA) RelaxNG.new(input, ) end
Schema(input) → Nokogiri::XML::Schema)
Schema(input, parse_options) → Nokogiri::XML::Schema)
Parse an ::XSD
schema definition and create a new Schema
object. This is a convenience method for Schema.new
See related: Schema.new
- Parameters
-
input
(String, IO)::XSD
schema definition -
parse_options
(Nokogiri::XML::ParseOptions)
- Returns
# File 'lib/nokogiri/xml/schema.rb', line 20
def Schema(input, = ParseOptions::DEFAULT_SCHEMA) Schema.new(input, ) end