Inheritance diagram for xmlpp::Element:
Public Types | |
typedef std::list< Attribute * > | AttributeList |
Public Member Functions | |
Element (_xmlNode *node) | |
virtual | ~Element () |
void | set_namespace_declaration (const std::string &ns_uri, const std::string &ns_prefix=std::string()) |
This adds a namespace declaration to this node which will apply to this node and all children. | |
AttributeList | get_attributes () |
Obtain the list of attributes for this element. | |
const AttributeList | get_attributes () const |
Obtain the list of attributes for this element. | |
Attribute * | get_attribute (const std::string &name, const std::string &ns_prefix=std::string()) const |
Attribute * | set_attribute (const std::string &name, const std::string &value, const std::string &ns_prefix=std::string()) |
Set the value of the attribute with this name, and optionally with this namespace. | |
void | remove_attribute (const std::string &name, const std::string &ns_prefix=std::string()) |
Remove the attribute with this name, and optionally with this namespace. | |
TextNode * | get_child_text () |
Get the first child text content node. | |
const TextNode * | get_child_text () const |
Get the first child text content node. | |
TextNode * | add_child_text (const std::string &content=std::string()) |
Append a new text node. | |
void | set_child_text (const std::string &content) |
Set the text of the first text node, adding one if necessary. | |
bool | has_child_text () const |
Discover whether one of the child nodes is a text node. | |
CommentNode * | add_child_comment (const std::string &content) |
Append a new comment node. | |
Protected Member Functions | |
std::string | get_namespace_uri_for_prefix (const std::string &ns_prefix) const |
This will be instantiated by the parser.
|
|
|
|
|
|
|
Append a new comment node.
|
|
Append a new text node.
|
|
|
|
Obtain the list of attributes for this element.
|
|
Obtain the list of attributes for this element.
|
|
Get the first child text content node. This is a convenience method, meant as an alternative to iterating over all the child nodes to find the first suitable node then and getting the text directly.
|
|
Get the first child text content node. This is a convenience method, meant as an alternative to iterating over all the child nodes to find the first suitable node then and getting the text directly.
|
|
|
|
Discover whether one of the child nodes is a text node. This is a convenience method, meant as an alternative to iterating over all the child nodes and examining them directly.
|
|
Remove the attribute with this name, and optionally with this namespace.
|
|
Set the value of the attribute with this name, and optionally with this namespace. A matching attribute will be added if no matching attribute already exists. For finer control, you might want to use get_attribute() and use the methods of the Attribute class.
|
|
Set the text of the first text node, adding one if necessary. This is a convenience method, meant as an alternative to iterating over all the child nodes to find the first suitable node then and setting the text directly.
|
|
This adds a namespace declaration to this node which will apply to this node and all children.
|