Public Types | Public Member Functions | Public Attributes

xl7::xml::Element Class Reference

#include <Element.h>

Inheritance diagram for xl7::xml::Element:
xl7::xml::Node xl7::xml::Base

List of all members.

Public Types

typedef std::map
< cl7::string_type, Attribute * > 
Attributes
typedef std::pair
< cl7::string_type, Attribute * > 
AttributeEntry

Public Member Functions

const cl7::string_typeget_name () const
void set_name (const cl7::string_type &name)
const Attributesget_attributes () const
void clear ()
cl7::string_type get_value () const
virtual cl7::string_type generate () const
Attributeset_attribute (const cl7::string_type &name, const cl7::string_type &value)
Attributeget_attribute (const cl7::string_type &name) const
bool has_attribute (const cl7::string_type &name) const
void remove_attribute (const cl7::string_type &name)
void clear_attributes ()
Elementadd_element (const cl7::string_type &name)
Commentadd_comment (const cl7::string_type &value)
ProcessingInstructionadd_processing_instruction (const cl7::string_type &target, const cl7::string_type &value)
Textadd_text (const cl7::string_type &value)
CDataadd_cdata (const cl7::string_type &value)
void remove_child_node (const Node *child_node)
void clear_child_nodes ()

Public Attributes

friend Document

Detailed Description

The (base) class representing an xml element node.


Member Typedef Documentation


Member Function Documentation

CData * xl7::xml::Element::add_cdata ( const cl7::string_type value  ) 

Adds a new CDATA section to this element.

Comment * xl7::xml::Element::add_comment ( const cl7::string_type value  ) 

Adds a new comment to this element.

Element * xl7::xml::Element::add_element ( const cl7::string_type name  ) 

Adds a new child element to this element.

ProcessingInstruction * xl7::xml::Element::add_processing_instruction ( const cl7::string_type target,
const cl7::string_type value 
)

Adds a new processing instruction to this element.

Text * xl7::xml::Element::add_text ( const cl7::string_type value  ) 

Adds new text to this element.

void xl7::xml::Element::clear (  ) 

Clears (removes) all child nodes and attributes.

void xl7::xml::Element::clear_attributes (  ) 

Clears (removes) all attributes.

void xl7::xml::Element::clear_child_nodes (  ) 

Clears (removes) all child nodes.

cl7::string_type xl7::xml::Element::generate (  )  const [virtual]

Generates xml text representing this xml object.

Reimplemented from xl7::xml::Node.

Attribute * xl7::xml::Element::get_attribute ( const cl7::string_type name  )  const

Returns the attribute of the given name (or NULL, if the attribute (name) does not exist).

const Attributes* xl7::xml::Element::get_attributes (  )  const [inline]

Returns the attributes of this element.

const cl7::string_type& xl7::xml::Element::get_name (  )  const [inline]

Returns the name of this element.

cl7::string_type xl7::xml::Element::get_value (  )  const

Returns the contained text of this element.

bool xl7::xml::Element::has_attribute ( const cl7::string_type name  )  const

Returns true, if this element holds an attribute of the given name, false otherwise.

void xl7::xml::Element::remove_attribute ( const cl7::string_type name  ) 

Removes an attribute from this element.

void xl7::xml::Element::remove_child_node ( const Node child_node  ) 

Removes the given child node from this element.

Attribute * xl7::xml::Element::set_attribute ( const cl7::string_type name,
const cl7::string_type value 
)

Sets the attribute of the given name to the given value. If the attribute exists, its value will be replaced by the new one. Otherwise, a new attribute will be created and added to this element.

void xl7::xml::Element::set_name ( const cl7::string_type name  )  [inline]

Sets the name of this element.


Member Data Documentation

Reimplemented from xl7::xml::Node.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines