Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members

xmlpp::Element Class Reference

Inheritance diagram for xmlpp::Element:

Inheritance graph
[legend]
List of all members.

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 () const
Attributeget_attribute (const std::string &name, const std::string &ns_prefix=std::string()) const
Attributeset_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.

TextNodeget_child_content ()
const TextNodeget_child_content () const
TextNodeadd_content (const std::string &content=std::string())
void set_child_content (const std::string &content)
bool has_content () const

Protected Member Functions

std::string get_namespace_uri_for_prefix (const std::string &ns_prefix) const

Constructor & Destructor Documentation

xmlpp::Element::Element _xmlNode *  node  )  [explicit]
 

virtual xmlpp::Element::~Element  )  [virtual]
 


Member Function Documentation

TextNode* xmlpp::Element::add_content const std::string &  content = std::string()  ) 
 

Attribute* xmlpp::Element::get_attribute const std::string &  name,
const std::string &  ns_prefix = std::string()
const
 

AttributeList xmlpp::Element::get_attributes  )  const
 

const TextNode* xmlpp::Element::get_child_content  )  const
 

TextNode* xmlpp::Element::get_child_content  ) 
 

std::string xmlpp::Element::get_namespace_uri_for_prefix const std::string &  ns_prefix  )  const [protected]
 

bool xmlpp::Element::has_content  )  const
 

void xmlpp::Element::remove_attribute const std::string &  name,
const std::string &  ns_prefix = std::string()
 

Remove the attribute with this name, and optionally with this namespace.

Parameters:
name The name of the attribute to be removed
ns_prefix Namespace prefix. If specified, the attribute will be removed only if the attribute has this namespace.

Attribute* xmlpp::Element::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.

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.

Parameters:
name The name of the attribute whose value will change.
value The new value for the attribute
ns_prefix Namespace prefix. If the prefix has not been declared then this method will throw an exception.
Returns:
The attribute that was changed, or 0 is no suitable Attribute was found.

void xmlpp::Element::set_child_content const std::string &  content  ) 
 

void xmlpp::Element::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.

Parameters:
ns_uri The namespace to associate with the prefix, or to use as the default namespace if no prefix is specified.
ns_prefix The namespace prefix. If no prefix is specified then the namespace URI will be the default namespace.


The documentation for this class was generated from the following file:
Generated on Wed Nov 12 18:25:47 2003 for libxml++ by doxygen 1.3.4