indexing description: "Represents an xml declaration of the form " author: "Lukas Angerer" date: "$Date$" revision: "$Revision$" class XML_DECLARATION inherit XML_NODE redefine to_xml_internal end create {XML_NODE} make_node feature -- Access version : STRING is -- gets the version string of this xml declaration local attr: XML_ATTRIBUTE do attr := attributes.get_attribute ("version") if attr = Void then Result := Void else Result := attr.value end end encoding : STRING is -- gets the encoding string of this xml declaration local attr: XML_ATTRIBUTE do attr := attributes.get_attribute ("encoding") if attr = Void then Result := Void else Result := attr.value end end is_standalone : BOOLEAN is -- gets the standalone value of this xml declaration local attr: XML_ATTRIBUTE do attr := attributes.get_attribute ("standalone") if attr = Void then Result := True else Result := attr.value.to_boolean end end feature -- Access from {XML_NODE} node_type : STRING is -- gets the node type do Result := "XML_DECLARATION" end feature -- Cloning clone_node (deep: BOOLEAN) : like Current is -- creates a clone of the current node local attr: XML_ATTRIBUTE do create Result.make_node (Void, parent, namespace, name.xml_prefix, name.xml_local_part) attr := attributes.get_attribute ("version") if attr /= Void then attributes.append (attr.clone_node (deep)) end attr := attributes.get_attribute ("encoding") if attr /= Void then attributes.append (attr.clone_node (deep)) end attr := attributes.get_attribute ("standalone") if attr /= Void then attributes.append (attr.clone_node (deep)) end end feature {XML_NODE} -- Implementation to_xml_internal (pretty_print: BOOLEAN; indent_depth: INTEGER) : STRING is -- generates the xml string for this xml declaration do create Result.make_empty Result.append ("") end end