Element_Node(3) Element_Node(3) NAME Element_Node - Node in an HTML tree for HTML elements SYNOPSIS namespace HTML_Tree { class element; class Element_Node : public HTML_Node { public: typedef std::map< std::string, std::string > attribute_map; Element_Node( char const *name, element const &elt, Content_Node *parent = 0 ); Element_Node( char const *name, element const &elt, char const *att_begin, char const *att_end, Content_Node *parent = 0 ); virtual ~Element_Node(); attribute_map attributes; char const *const name; protected: // overridden virtual bool similar_to() const; virtual bool write_node( std::ostream&, int, bool ) const; }; } DESCRIPTION Element_Node is-an HTML_Node for HTML elements, e.g.: HEAD, TITLE, IMG, SELECT, etc. Public Interface Constructors Construct an Element_Node. The arguments are: name The name of the HTML element. It must be specified in lower case. att_begin, att_end Pointers to the beginning character and one past the end (in STL iterator style) whence to parse the attributes from, e.g.: | | begin end elt A reference to the element that this node is being made for. parent The parent node to make this node a child of, if any. Destructor There is nothing noteworthy about it. attribute_map attributes Contains key/value pairs of attribute names and their values. Attribute names are in lower case (regardless of how they are in the HTML file). Boolean attributes have their name as their value (per the HTML 4.0 specification). char const *const name The name of the HTML element, e.g., title. Names are in lower case (regardless of how they are in the HTML file). SEE ALSO Content_Node(3), HTML_Node(3). Dave Raggett, Arnaud Le Hors, and Ian Jacobs. ``On SGML and HTML: SGML constructs used in HTML: Attributes,'' HTML 4.0 Specification, section 3.2.2, World Wide Web Consor­ tium, April 1998. http://www.w3.org/TR/PR-html40/intro/sgml­ tut.html#h-3.2.2 AUTHOR Paul J. Lucas HTML Tree March 17, 2003 Element_Node(3)