#include <GXmlTree.h>
Public Member Functions | |
GXmlTree (int Flags=0) | |
Constructor. | |
bool | Read (GXmlTag *Root, GStreamI *File, GXmlFactory *Factory=0) |
Read an XML file into a DOM tree of GXmlTag objects from a stream. | |
bool | Write (GXmlTag *Root, GStreamI *File) |
Write an XML file from a DOM tree of GXmlTag objects into a stream. | |
char * | GetErrorMsg () |
Gets the last error message. | |
GHashTable * | NoChildTags () |
A hash of tags that can't have children. | |
char * | GetStyleFile (char **StyleType=0) |
Gets the associated style file. | |
void | SetStyleFile (char *stylefile, char *styletype="text/css") |
Sets the associated css file. | |
GHashTbl< const char *, char16 > * | GetEntityTable () |
Add entities. | |
char * | DecodeEntities (char *s, int len=-1) |
Decode a string with entities. | |
char * | EncodeEntities (char *s, int len=-1, const char *extra_characters=0) |
Encode a string to use entities. | |
bool | EncodeEntities (GStreamI *out, char *s, int len, const char *extra_characters=0) |
Encode a string to use entities. | |
Friends | |
class | GXmlTag |
GXmlTree::GXmlTree | ( | int | Flags = 0 |
) |
Constructor.
Flags |
bool GXmlTree::Read | ( | GXmlTag * | Root, | |
GStreamI * | File, | |||
GXmlFactory * | Factory = 0 | |||
) |
Read an XML file into a DOM tree of GXmlTag objects from a stream.
Root | The root tag to create children from. |
File | The stream to read from. |
Factory | [Optional] The factory to create GXmlTag type objects. If not specified vanilla GXmlTag objects will be created. |
References GXmlTag::Allocator, GXmlTag::Attr, GXmlTag::Children, List< Type >::First(), GStreamI::GetSize(), GXT_NO_DOM, GXmlTag::InsertTag(), GArray< Type >::Length(), GXmlAttr::Name, List< Type >::Next(), GFile::Open(), GXmlTag::Parent, GStreamI::Read(), GXmlTag::Serialize(), GXmlTag::Tag, GXmlTag::Write, Write(), and GVariant::WStr().
Referenced by GApp::GetConfig().
Write an XML file from a DOM tree of GXmlTag objects into a stream.
Root | The DOM tree. |
File | The output stream. |
References GStreamI::SetSize(), and GStreamI::Write().
Referenced by Read().