class REXML::Child

def document

belongs to no document
Returns:: the document this child belongs to, or nil if this child
def document
  return parent.document unless parent.nil?
  nil
end