Class | Nokogiri::XML::Document |
In: |
lib/nokogiri/ffi/xml/document.rb
lib/nokogiri/xml/document.rb ext/nokogiri/html_document.c |
Parent: | Node |
Nokogiri::XML::Document is the main entry point for dealing with XML documents. The Document is created by parsing an XML document. See Nokogiri.XML()
For searching a Document, see Nokogiri::XML::Node#css and Nokogiri::XML::Node#xpath
serialize | -> | to_xml |
serialize | -> | inner_html |
errors | [RW] | A list of Nokogiri::XML::SyntaxError found when parsing a document |
Parse an XML file. thing may be a String, or any object that responds to read and close such as an IO, or StringIO. url is resource where this document is located. encoding is the encoding that should be used when processing the document. options is a number that sets options in the parser, such as Nokogiri::XML::PARSE_RECOVER. See the constants in Nokogiri::XML.
Copy this Document. An optional depth may be passed in, but it defaults to a deep copy. 0 is a shallow copy, 1 is a deep copy.