183 explicit GXml(
const std::string& xml);
196 int size(
void)
const;
202 void remove(
const int& index);
206 int elements(
const std::string& name)
const;
218 void write(
GUrl& url,
const int& indent = 0)
const;
221 const int& indent = 0)
const;
Definition of interface for container classes.
Abstract URL base class interface definition.
XML document node class interface definition.
XML element node class interface definition.
Abstract XML node base class interface definition.
XML text node class interface definition.
Interface class for container classes.
Abstract XML node base class.
virtual bool is_empty(void) const
Signals if node has no child nodes.
virtual int size(void) const
Return number of child nodes.
std::string classname(void) const
Return class name.
GXmlDocument m_root
Root document node.
void parse(const GUrl &url)
Parse XML URL.
void extend(const GXmlNode &node)
Append all XML child nodes from another XML node in the XML document root.
void process_text(GXmlNode **current, const std::string &segment)
Process text segment.
void clear(void)
Clear XML object.
void free_members(void)
Delete class members.
void copy_members(const GXml &xml)
Copy class members.
void reserve(const int &num)
Reserve space for child nodes in XML document root.
void save(const GFilename &filename) const
Save XML document into file.
GXmlNode * operator[](const int &index)
Return pointer to child of XML document root element.
GXmlElement * element(const int &index)
Return pointer to child element.
void remove(const int &index)
Remove child node from XML document root.
GXmlNode * append(const GXmlNode &node)
Append child node to XML document root.
bool is_empty(void) const
Signals if document has no child nodes.
GXmlNode * set(const int &index, const GXmlNode &node)
Set child node in XML document root.
void process_markup(GXmlNode **current, const std::string &segment)
Process markup segment.
void load(const GFilename &filename)
Load XML document from file.
virtual ~GXml(void)
Destructor.
const GXmlDocument & root(void) const
Return document root.
GXml(void)
Void constructor.
void read(const GUrl &url)
Read XML document from URL.
void write(GUrl &url, const int &indent=0) const
Write XML document into URL.
void init_members(void)
Initialise class members.
int elements(void) const
Return number of child elements in XML document root.
int size(void) const
Return number of child nodes.
std::string print(const GChatter &chatter=NORMAL) const
Print XML object.
GXml & operator=(const GXml &xml)
Assignment operator.
MarkupType get_markuptype(const std::string &segment) const
Get Markup type of segment.
GXmlNode * insert(const int &index, const GXmlNode &node)
Insert child node into XML document root.
GXml * clone(void) const
Clone XML object.