Module: Nokogiri::XML
- Defined in:
- lib/nokogiri/xml.rb,
lib/nokogiri/xml/dtd.rb,
lib/nokogiri/xml/attr.rb,
lib/nokogiri/xml/node.rb,
lib/nokogiri/xml/cdata.rb,
lib/nokogiri/xml/xpath.rb,
lib/nokogiri/xml/reader.rb,
lib/nokogiri/xml/schema.rb,
lib/nokogiri/ffi/xml/dtd.rb,
lib/nokogiri/xml/builder.rb,
lib/nokogiri/xml/pp/node.rb,
lib/nokogiri/ffi/xml/attr.rb,
lib/nokogiri/ffi/xml/node.rb,
lib/nokogiri/ffi/xml/text.rb,
lib/nokogiri/xml/document.rb,
lib/nokogiri/xml/node_set.rb,
lib/nokogiri/xml/notation.rb,
lib/nokogiri/xml/relax_ng.rb,
lib/nokogiri/ffi/xml/cdata.rb,
lib/nokogiri/ffi/xml/xpath.rb,
lib/nokogiri/xml/namespace.rb,
lib/nokogiri/ffi/xml/reader.rb,
lib/nokogiri/ffi/xml/schema.rb,
lib/nokogiri/xml/sax/parser.rb,
lib/nokogiri/ffi/xml/comment.rb,
lib/nokogiri/xml/entity_decl.rb,
lib/nokogiri/ffi/xml/document.rb,
lib/nokogiri/ffi/xml/node_set.rb,
lib/nokogiri/ffi/xml/relax_ng.rb,
lib/nokogiri/xml/element_decl.rb,
lib/nokogiri/xml/sax/document.rb,
lib/nokogiri/xml/syntax_error.rb,
lib/nokogiri/ffi/xml/namespace.rb,
lib/nokogiri/xml/parse_options.rb,
lib/nokogiri/xml/xpath_context.rb,
lib/nokogiri/ffi/xml/sax/parser.rb,
lib/nokogiri/xml/attribute_decl.rb,
lib/nokogiri/xml/character_data.rb,
lib/nokogiri/ffi/xml/entity_decl.rb,
lib/nokogiri/xml/element_content.rb,
lib/nokogiri/xml/sax/push_parser.rb,
lib/nokogiri/ffi/xml/element_decl.rb,
lib/nokogiri/ffi/xml/syntax_error.rb,
lib/nokogiri/xml/fragment_handler.rb,
lib/nokogiri/ffi/xml/xpath_context.rb,
lib/nokogiri/xml/document_fragment.rb,
lib/nokogiri/xml/node/save_options.rb,
lib/nokogiri/xml/pp/character_data.rb,
lib/nokogiri/ffi/xml/attribute_decl.rb,
lib/nokogiri/xml/sax/parser_context.rb,
lib/nokogiri/xml/xpath/syntax_error.rb,
lib/nokogiri/ffi/xml/element_content.rb,
lib/nokogiri/ffi/xml/sax/push_parser.rb,
lib/nokogiri/ffi/xml/entity_reference.rb,
lib/nokogiri/ffi/xml/document_fragment.rb,
lib/nokogiri/ffi/xml/sax/parser_context.rb,
lib/nokogiri/xml/processing_instruction.rb,
lib/nokogiri/ffi/xml/processing_instruction.rb,
ext/nokogiri/xml_dtd.c,
ext/nokogiri/nokogiri.c,
ext/nokogiri/xml_attr.c,
ext/nokogiri/xml_node.c,
ext/nokogiri/xml_text.c,
ext/nokogiri/xml_cdata.c,
ext/nokogiri/xml_xpath.c,
ext/nokogiri/xml_reader.c,
ext/nokogiri/xml_schema.c,
ext/nokogiri/xml_comment.c,
ext/nokogiri/xml_document.c,
ext/nokogiri/xml_node_set.c,
ext/nokogiri/xml_relax_ng.c,
ext/nokogiri/html_document.c,
ext/nokogiri/xml_namespace.c,
ext/nokogiri/xml_sax_parser.c,
ext/nokogiri/xml_entity_decl.c,
ext/nokogiri/xml_element_decl.c,
ext/nokogiri/xml_syntax_error.c,
ext/nokogiri/xml_xpath_context.c,
ext/nokogiri/xml_attribute_decl.c,
ext/nokogiri/xml_element_content.c,
ext/nokogiri/xml_sax_push_parser.c,
ext/nokogiri/xml_entity_reference.c,
ext/nokogiri/xml_document_fragment.c,
ext/nokogiri/xml_sax_parser_context.c,
ext/nokogiri/html_sax_parser_context.c,
ext/nokogiri/xml_processing_instruction.c
Defined Under Namespace
Modules: PP, SAX Classes: Attr, AttributeDecl, Builder, CDATA, CharacterData, Comment, DTD, Document, DocumentFragment, Element, ElementContent, ElementDecl, EntityDecl, EntityReference, FragmentHandler, Namespace, Node, NodeSet, Notation, ParseOptions, ProcessingInstruction, Reader, RelaxNG, Schema, SyntaxError, Text, XPath, XPathContext
Class Method Summary collapse
-
.fragment(string) ⇒ Object
Parse a fragment from
string
in to a NodeSet. -
.parse(thing, url = nil, encoding = nil, options = ParseOptions::DEFAULT_XML, &block) ⇒ Object
Parse XML.
-
.Reader(string_or_io, url = nil, encoding = nil, options = ParseOptions::STRICT) {|options| ... } ⇒ Object
Parse an XML document using the Nokogiri::XML::Reader API.
-
.RelaxNG(string_or_io) ⇒ Object
Create a new Nokogiri::XML::RelaxNG document from
string_or_io
. -
.Schema(string_or_io) ⇒ Object
Create a new Nokogiri::XML::Schema object using a
string_or_io
object.
Class Method Details
.fragment(string) ⇒ Object
Parse a fragment from string
in to a NodeSet.
62 63 64 |
# File 'lib/nokogiri/xml.rb', line 62 def fragment string XML::DocumentFragment.parse(string) end |
.parse(thing, url = nil, encoding = nil, options = ParseOptions::DEFAULT_XML, &block) ⇒ Object
Parse XML. Convenience method for Nokogiri::XML::Document.parse
56 57 58 |
# File 'lib/nokogiri/xml.rb', line 56 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| ... } ⇒ Object
Parse an XML document using the Nokogiri::XML::Reader API. See Nokogiri::XML::Reader for mor information
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/nokogiri/xml.rb', line 42 def Reader string_or_io, url = nil, encoding = nil, = ParseOptions::STRICT = Nokogiri::XML::ParseOptions.new() if Fixnum === # Give the options to the user 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 |