class Nokogiri::XML::Document

Nokogiri::XML::Node#xpath
For searching a Document, see Nokogiri::XML::Node#css and
See Nokogiri.XML()
XML documents. The Document is created by parsing an XML document.
Nokogiri::XML::Document is the main entry point for dealing with
###

def decorate(node)

Apply any decorators to +node+
##
def decorate(node)
  return unless @decorators
  @decorators.each { |klass,list|
    next unless node.is_a?(klass)
    list.each { |moodule| node.extend(moodule) }
  }
end

def decorators(key)

Get the list of decorators given +key+
def decorators(key)
  @decorators ||= Hash.new
  @decorators[key] ||= []
end

def document

A reference to +self+
def document
  self
end

def name

The name of this document. Always returns "document"
def name
  'document'
end

def namespaces

Get the hash of namespaces on the root Nokogiri::XML::Node
def namespaces
  root ? root.collect_namespaces : {}
end

def node_cache # :nodoc:

:nodoc:
def node_cache # :nodoc:
  @node_cache ||= {}
end

def slop!

Explore a document with shortcut methods.
##
def slop!
  unless decorators(XML::Node).include? Nokogiri::Decorators::Slop
    decorators(XML::Node) << Nokogiri::Decorators::Slop
    decorate!
  end
  self
end