zenilib
0.5.3.0
|
A class to open an XML file and manage the root node. More...
#include <XML.h>
Public Member Functions | |
XML_Document () | |
XML_Document (const String &filename) | |
XML_Document (const String &filename, const String &backup) | |
~XML_Document () | |
void | create_root (const String &field) |
(Re)Initializes the document with a given root field More... | |
XML_Element_c | first () const |
Get the first subelement. More... | |
XML_Element | first () |
Get the first subelement. More... | |
bool | good () const |
void | load (const String &filename) |
void | load_mem (const String &data) |
XML_Element_c | operator[] (const String &field) const |
Get a named subelement. More... | |
XML_Element | operator[] (const String &field) |
Get a named subelement. More... | |
void | save () |
void | save (const String &filename) |
bool | try_load (const String &filename) |
bool | try_load_mem (const String &data) |
bool | try_save () |
bool | try_save (const String &filename) |
A class to open an XML file and manage the root node.
Contact: bazal d@ze nipex .com
Definition at line 247 of file XML.cpp.
References load(), and try_load().
(Re)Initializes the document with a given root field
Manipulation Functions
Definition at line 386 of file XML.cpp.
References Zeni::String::c_str(), and TiXmlNode::LinkEndChild().
XML_Element_c Zeni::XML_Document::first | ( | ) | const |
Get the first subelement.
Definition at line 368 of file XML.cpp.
References Zeni::XML_Element::first(), and good().
XML_Element Zeni::XML_Document::first | ( | ) |
Get the first subelement.
Definition at line 377 of file XML.cpp.
References Zeni::XML_Element::first(), and good().
bool Zeni::XML_Document::good | ( | ) | const |
Load and Save
Definition at line 258 of file XML.cpp.
Referenced by first(), operator[](), and try_save().
Definition at line 270 of file XML.cpp.
References TiXmlDocument::ErrorDesc(), and try_load().
Referenced by Zeni::Video::save(), and XML_Document().
Definition at line 262 of file XML.cpp.
References TiXmlDocument::ErrorDesc(), and try_load_mem().
Referenced by Zeni::Database< TYPE >::load_file().
XML_Element_c Zeni::XML_Document::operator[] | ( | const String & | field | ) | const |
XML_Element Zeni::XML_Document::operator[] | ( | const String & | field | ) |
void Zeni::XML_Document::save | ( | ) |
Definition at line 278 of file XML.cpp.
References TiXmlDocument::ErrorDesc(), and try_save().
Definition at line 286 of file XML.cpp.
References TiXmlDocument::ErrorDesc(), and try_save().
Definition at line 314 of file XML.cpp.
References Zeni::String::c_str(), and TiXmlDocument::LoadFile().
Referenced by load(), load_config(), Zeni::Video::save(), and XML_Document().
Definition at line 294 of file XML.cpp.
References Zeni::String::c_str(), TiXmlDocument::Parse(), and ZENI_LOGE().
Referenced by load_mem().
bool Zeni::XML_Document::try_save | ( | ) |
Definition at line 332 of file XML.cpp.
References good(), and TiXmlDocument::SaveFile().
Referenced by save(), and Zeni::Video::save().
Definition at line 341 of file XML.cpp.
References Zeni::String::c_str(), good(), and TiXmlDocument::SaveFile().