#include <skElement.h>
Inheritance diagram for skElement:
Public Member Functions | |
IMPORT_C | skElement (const skString &tagname) |
This constructs a new element with the given tag. | |
virtual IMPORT_C | ~skElement () |
Virtual destructor. | |
IMPORT_C void | appendChild (skNode *child) |
This adds a child to the list of children owned by this element. | |
IMPORT_C void | removeAndDestroyChild (skNode *child) |
This removes a child from the list of children owned by this element. | |
IMPORT_C void | removeChild (skNode *child) |
This removes a child from the list of children owned by this element. | |
IMPORT_C void | setAttribute (const skString &name, const skString &value) |
This sets an attribute of this element. | |
IMPORT_C bool | removeAttribute (const skString &name) |
This removes an attribute from the element. | |
IMPORT_C skString | getAttribute (const skString &name) const |
This returns the value of an attribute. | |
IMPORT_C skString | getAttribute (const skString &name, const skString &default_value) const |
This returns the value of an attribute. | |
IMPORT_C skString | getAttribute (const TDesC &name) const |
This returns the value of an attribute. | |
IMPORT_C skAttributeList & | getAttributes () |
This method returns the list of attributes owned by this element. | |
IMPORT_C skNodeList & | getChildNodes () |
This method returns the list of child nodes owned by this element. | |
IMPORT_C skString | getTagName () const |
This returns the tag name for the element. | |
virtual IMPORT_C NodeType | getNodeType () const |
this returns the type of this node | |
virtual IMPORT_C skNode * | clone () |
This method returns a new element with the same tag name, attributes and child list. | |
virtual IMPORT_C skString | toString () const |
Copies this element, its attributes and children to a string. | |
virtual IMPORT_C void | write (skOutputDestination &out) const |
Writes this element, its attributes and children to the given destination. | |
bool IMPORT_C | operator== (const skElement &other) const |
Does a deep comparison against another element, without checking the tag name of this element. | |
bool IMPORT_C | equals (const skNode &other) const |
Does a deep comparison against another element. | |
bool IMPORT_C | 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, a blank string is returned.
|
|
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. |