#
# $Id: document.icn,v 1.1 2003/08/04 17:35:05 jeffery Exp $
#
# This file is in the public domain.
#
# Author: Robert Parlett (parlett@dial.pipex.com)
#

package xml

#
# The base class for a document, being either an XML or HTML document.
#
class Document : Node()
   #
   # Returns "document"
   #
   method get_type()
      return "document"
   end

   method get_root_element()
      local n
      every n := !children do
         if not(string(n)) & n.get_type() == "element" then
            return n
   end

   initially()
      self.Node.initially()
end