#include <XMLDocument.h>
Inheritance diagram for util::xml::Element:

An opening element can have both children and attributes (which are in fact children, too). An empty element may have attributes but no other children. A closing element may have no children and no attributes.
Public Types | |
| enum | Type { TAG_OPENING, TAG_CLOSING, TAG_EMPTY } |
| Possible tag types. More... | |
Public Methods | |
| Element (std::string name, Type type=TAG_OPENING) | |
| Create a new element with the given name and type. | |
| Element (const Element &other) | |
| Copy an element. | |
| Element & | operator= (const Element &other) |
| Copy an element. | |
| std::string | getAttribute (std::string name) |
| Get a given attribute in this element. | |
| Attr * | getAttributeNode (std::string name) |
| Get a given attribute in this element. | |
| void | setAttribute (std::string name, std::string value) |
| Set an attribute in this element. | |
| void | setAttributeNode (Attr *node) |
| Set an attribute in this element. | |
| void | appendChild (Node *child) |
| Add a child node to this Element. | |
| void | removeChild (Node *child) |
| Remove a child node from this Element. | |
| std::string | getName () const |
| Get the tag name of this element. | |
| void | printOut (std::ostream &out) const throw (util::io::IOException&) |
| Print out an element. | |
Public Attributes | |
| std::string | tagName |
| The tag name of this element. | |
| Type | tagType |
| The tag type of this element. | |
|
|
Possible tag types.
|
|
|
Add a child node to this Element. Overridden to handle attributes specially. Reimplemented from util::xml::Node. |
|
|
Get a given attribute in this element.
|
|
|
Get a given attribute in this element.
|
|
|
Print out an element. Printing an element causes its children to be printed as well. Children of type ATTRIBUTE_NODE are treated specially as they must be printed inside a tag. Implements util::xml::Node. |
|
|
Remove a child node from this Element. Overridden to handle attributes specially. Reimplemented from util::xml::Node. |
|
||||||||||||
|
Set an attribute in this element.
|
|
|
Set an attribute in this element.
|