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