#include <xml.h>
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 xstring & | get_type () const |
| int | get_child_count () const |
| void | add_child (pointer p) |
| xml_element * | add_child (const xstring &type) |
| void | remove (pointer child, bool delete_child) |
| xml_element * | find_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) |
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
| 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
1.6.3