Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

GXmlTag Class Reference

#include <GXmlTree.h>

Inheritance diagram for GXmlTag:

GDom List of all members.

Public Member Functions

 GXmlTag (char *tag=0)
 Construct the object.
bool Dump (int Depth=0)
 For debugging.
char * GetAttr (char *Name)
 Get the string value of a named attribute.
int GetAsInt (char *Name)
 Get the value of a named attribute as an int.
bool SetAttr (char *Name, char *Value)
 Set the value of a named attribute to a string.
bool SetAttr (char *Name, int Value)
 Set the value of a named attribute to an int.
bool SerializeAttr (char *Attr, int &Int)
 Read/write a native C integer into an attribute.
bool SerializeAttr (char *Attr, char *&Str)
 Read/write a native C dynamically allocated string into an attribute.
bool SerializeAttr (char *Attr, double &Dbl)
 Read/write a native C double into an attribute.
virtual bool Serialize ()
 Read/write all your native types in here.
GXmlTagGetTag (char *Name, bool Create=false)
 Returns a pointer to a child tag if present, or NULL if not.
GXmlTagCreateTag (char *Name)
 Creates a sub tag if it doesn't already exist.
virtual void InsertTag (GXmlTag *t)
 Inserts a child tag.
virtual void RemoveTag ()
 Removes this tag from the DOM heirarchy.

Public Attributes

char * Tag
char * Content
 Any content following the tag.
GXmlTagParent
 The parent element/tag.
List< GXmlAttrAttr
 A list of attributes that this tag has.
List< GXmlTagChildren

Friends

class GXmlTree

Detailed Description

An XML element or tag. Contains optionally sub tags and a list of attributes. C++ applications can inherit from this and have native member types mapped to attributes using the SerializeAttr methods. All you have to do is override the virtual member function Serialize and call SerializeAttr on each of your native member variables. When loading and saving the attributes will be mapped to and from your native types.


Constructor & Destructor Documentation

GXmlTag::GXmlTag char *  tag = 0  ) 
 

Construct the object.

Parameters:
tag  [Optional] Start with this name


Member Data Documentation

List<GXmlTag> GXmlTag::Children
 

A list of child tags. Don't edit this list yourself, use the InsertTag and RemoveTag methods.

char* GXmlTag::Tag
 

The name of the tag/element. This can be NULL in the case that the element is purely content.


The documentation for this class was generated from the following files:
Generated on Wed Oct 26 14:47:04 2005 for Lgi by  doxygen 1.4.1