xml_element Class Reference

#include <xml.h>

List of all members.

Public Types

typedef child_vec::iterator iterator
typedef child_vec::const_iterator const_iterator
typedef attr_map::const_iterator attr_iterator

Public Member Functions

 xml_element (const xstring &type="")
void set_type (const xstring &type)
const xstringget_type () const
int get_child_count () const
void add_child (pointer p)
xml_elementadd_child (const xstring &type)
void remove (pointer child, bool delete_child)
xml_elementfind_child (const xstring &type)
bool has_attribute (const xstring &name) const
void set_attribute (const xstring &name, const xstring &value)
xstring get_attribute (const xstring &name) const
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
attr_iterator attr_begin () const
attr_iterator attr_end () const
void print (std::ostream &os=std::cout, int indent=0, bool packed=false) const
xstring print (bool packed)

Detailed Description

Main class for an XML node / element Each element provides access to: Attributes via get/set methods Children elements in a tree structures via add/remove/iterators


Member Function Documentation

xml_element* xml_element::find_child ( const xstring type  )  [inline]

Finds first child with the given type

void xml_element::remove ( pointer  child,
bool  delete_child 
) [inline]

Removes a child, given by its element pointer delete_child controls whether to delete the child's subtree


The documentation for this class was generated from the following file:
Generated on Wed May 26 17:40:59 2010 for SDLPP by  doxygen 1.6.3