#include <skElement.h>
Inheritance diagram for skElement:

Public Member Functions | |
| skElement (const skString &tagname) | |
| This constructs a new element with the given tag.  | |
| virtual | ~skElement () | 
| Virtual destructor. | |
| void | appendChild (skNode *child) | 
| This adds a child to the list of children owned by this element.  | |
| void | removeAndDestroyChild (skNode *child) | 
| This removes a child from the list of children owned by this element.  | |
| void | removeChild (skNode *child) | 
| This removes a child from the list of children owned by this element.  | |
| void | setAttribute (const skString &name, const skString &value) | 
| This sets an attribute of this element.  | |
| bool | removeAttribute (const skString &name) | 
| This removes an attribute from the element.  | |
| skString | getAttribute (const skString &name) const | 
| This returns the value of an attribute.  | |
| skString | getAttribute (const skString &name, const skString &default_value) const | 
| This returns the value of an attribute.  | |
| skAttributeList & | getAttributes () | 
| This method returns the list of attributes owned by this element.  | |
| skNodeList & | getChildNodes () | 
| This method returns the list of child nodes owned by this element.  | |
| skString | getTagName () const | 
| This returns the tag name for the element.  | |
| virtual NodeType | getNodeType () const | 
| this returns the type of this node  | |
| virtual skNode * | clone () | 
| This method returns a new element with the same tag name, attributes and child list.  | |
| virtual skString | toString () const | 
| Copies this element, its attributes and children to a string.  | |
| virtual void | write (skOutputDestination &out) const | 
| Writes this element, its attributes and children to the given destination.  | |
| bool | operator== (const skElement &other) const | 
| Does a deep comparison against another element, without checking the tag name of this element. | |
| bool | equals (const skNode &other) const | 
| Does a deep comparison against another element. | |
| bool | deepCompare (const skElement &other, bool check_tagname) const | 
| Does a deep compare another element, with an optional check on the tag name. | |
Protected Attributes | |
| skString | m_TagName | 
| this variable stores the tag name for this element | |
| skAttributeList | m_Attributes | 
| this holds the list of attributes for this element | |
| skNodeList | m_ChildNodes | 
| this holds the list of child nodes owned by this element | |
The class forms part of the Simkin DOM class library.
      
  | 
  
| 
 This constructs a new element with the given tag. 
 
  | 
  
      
  | 
  
| 
 This adds a child to the list of children owned by this element. The node's "parent" field is set to this element 
 
  | 
  
      
  | 
  
| 
 This method returns a new element with the same tag name, attributes and child list. A deep copy is made. 
 
 Implements skNode.  | 
  
      
  | 
  ||||||||||||
| 
 This returns the value of an attribute. If the attribute does not exist, the default value is returned. 
 
  | 
  
      
  | 
  
| 
 This returns the value of an attribute. If the attribute does not exist, a blank string is returned. 
 
  | 
  
      
  | 
  
| 
 This method returns the list of attributes owned by this element. 
 
  | 
  
      
  | 
  
| 
 This method returns the list of child nodes owned by this element. 
 
  | 
  
      
  | 
  
| 
 this returns the type of this node 
 
 Implements skNode.  | 
  
      
  | 
  
| 
 This returns the tag name for the element. 
 
  | 
  
      
  | 
  
| 
 This removes a child from the list of children owned by this element. The child is deleted by this function. 
  | 
  
      
  | 
  
| 
 This removes an attribute from the element. 
 
 
  | 
  
      
  | 
  
| 
 This removes a child from the list of children owned by this element. The child is *not* deleted by this function. The child's "parent" field is set to zero. 
  | 
  
      
  | 
  ||||||||||||
| 
 This sets an attribute of this element. The attribute is added, if not already present. 
 
  | 
  
      
  | 
  
| 
 Copies this element, its attributes and children to a string. 
 
 
 Implements skNode.  | 
  
      
  | 
  
| 
 Writes this element, its attributes and children to the given destination. 
 
 
 Implements skNode.  | 
  
1.3