indexing description: "Objects that ..." author: "" date: "$Date$" revision: "$Revision$" class XML_ATTRIBUTE inherit XML_NODE redefine make_node, to_xml_internal, debug_out_impl end create {XML_NODE} make_node feature -- Creation make_node (doc: XML_DOCUMENT; parent_node: XML_NODE; a_namespace, a_prefix, a_local_part: STRING) is -- Creates a new instance of this xml node type do Precursor (doc, parent_node, a_namespace, a_prefix, a_local_part) create value.make_empty end feature -- Access from {XML_NODE} node_type : STRING is -- gets the node type do Result := "XML_ATTRIBUTE" end feature -- Cloning clone_node (deep: BOOLEAN) : like Current is -- creates a clone of the current node do create Result.make_node (Void, parent, namespace, name.xml_prefix, name.xml_local_part) Result.set_value (value.twin) end feature {XML_NODE} -- Implementation to_xml_internal (pretty_print: BOOLEAN; indent_depth: INTEGER) : STRING is -- generates the string for the xml content do Result := name.name + "=%"" + value + "%"" end feature {XML_NODE} -- Debug debug_out_impl (pre: STRING) : STRING is -- do create Result.make_empty Result.append (pre + node_type + ": " + name.name + " = " + value + "%N") end invariant cannot_have_attributes: attributes.is_empty cannot_have_child_nodes: child_nodes.is_empty end