30#ifndef _util_xml_class_XMLElement_
31#define _util_xml_class_XMLElement_
59 template <
class T>
friend class RefPtr;
81 const std::string&
label()
const;
Definition XMLElement.h:58
std::string label_
The iterator type returned for list of children.
Definition XMLElement.h:143
RefPtr< XMLElement > get_child(int)
Definition XMLElement.cpp:111
int count_children() const
Utility function to check how many children this element has.
Definition XMLElement.cpp:104
RefPtr< XMLAttributeList > attributes_
The list of attributes associated with this element.
Definition XMLElement.h:146
void set_label(const std::string &)
Assign a new label to this node.
Definition XMLElement.cpp:76
void clear_content()
Clear all text content.
Definition XMLElement.cpp:227
std::vector< std::string > content_
The list of content associated with this element.
Definition XMLElement.h:152
void clear_children()
Erase all child elements from this node.
Definition XMLElement.cpp:196
std::vector< RefPtr< XMLElement > > children_
The list of children associated with this element.
Definition XMLElement.h:149
virtual ~XMLElement()
Destructor.
Definition XMLElement.cpp:56
void add_child(RefPtr< XMLElement >)
Definition XMLElement.cpp:145
void add_content_line(const std::string &)
Add a line of content.
Definition XMLElement.cpp:220
XMLElement & operator=(const XMLElement &)
Definition XMLElement.cpp:62
void set_attributes(RefPtr< XMLAttributeList >)
Assign an attribute list to this element.
Definition XMLElement.cpp:97
int count_attributes() const
Definition XMLElement.cpp:83
void recurse(RefPtr< XMLElement >, std::set< RefPtr< XMLElement > >)
Definition XMLElement.cpp:234
int count_content() const
Definition XMLElement.cpp:203
RefPtr< XMLAttributeList > attributes()
Get access to the attribute list.
Definition XMLElement.cpp:90
const std::string & label() const
Get the label of this node.
Definition XMLElement.cpp:69
friend class ConstRefPtr
Definition XMLElement.h:60
void add_child_rpt(RefPtr< XMLElement >)
Same as add_child, but this allows for repeating children.
Definition XMLElement.cpp:172
const std::string & get_content_line(int)
Definition XMLElement.cpp:210
XMLElement(const std::string &)
Construct a new xml element object and give it a label.
Definition XMLElement.cpp:40