note description: "Summary description for {XML_DOCUMENT}." date: "$Date$" revision: "$Revision$" class XML_DOCUMENT inherit XML_COMPOSITE create make, make_with_count, make_with_root_named, make_with_root_named_and_count feature {NONE} -- Initialization make -- Create root node. do make_with_count (3) end make_with_count (a_count: INTEGER) -- Create root node and initialize for `a_count' childrens require a_count_positive: a_count >= 0 do make_with_root_named_and_count (Default_name, Default_ns, a_count) end make_with_root_named (a_name: READABLE_STRING_32; a_ns: XML_NAMESPACE) -- Create root node, with a root_element -- with given name. require not_void: a_name /= Void not_empty: a_name.count > 0 do make_with_root_named_and_count (a_name, a_ns, 3) ensure root_element_name_set: root_element.has_same_name (a_name) end make_with_root_named_and_count (a_name: READABLE_STRING_32; a_ns: XML_NAMESPACE; a_count: INTEGER) -- Create root node, with a root_element with given name, -- and initialize for `a_count' childrens require not_void: a_name /= Void not_empty: a_name.count > 0 a_count_positive: a_count >= 0 do initialize_with_count (a_count) create root_element.make (Void, a_name, a_ns) root_element.attach_parent (Current) force_last (root_element) ensure root_element_name_set: root_element.has_same_name (a_name) end Default_name: STRING_32 = "root" feature -- Access root_element: XML_ELEMENT -- Root element of current document. xml_declaration: detachable XML_DECLARATION -- Optional