#include <ticpp.h>

Public Member Functions | |
| Document () | |
| Default Constructor. | |
| Document (TiXmlDocument *document) | |
| Constructor. | |
| Document (const char *documentName) | |
| Constructor. | |
| Document (const std::string &documentName) | |
| Constructor. | |
| void | LoadFile (TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING) |
| Load a file using the current document value. | |
| void | SaveFile () const |
| Save a file using the current document value. | |
| void | LoadFile (const std::string &filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING) |
| Load a file using the given filename. | |
| void | LoadFile (const char *filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING) |
| void | SaveFile (const std::string &filename) const |
| Save a file using the given filename. | |
| void | Parse (const std::string &xml, bool throwIfParseError=true, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING) |
| Parse the given xml data. | |
| ticpp::Document::Document | ( | ) |
Default Constructor.
Create an empty document, that has no name.
| ticpp::Document::Document | ( | const std::string & | documentName | ) |
Constructor.
Create a document with a name. The name of the document is also the filename of the xml.
| documentName | Name to set in the Document. |
| void ticpp::Document::LoadFile | ( | TiXmlEncoding | encoding = TIXML_DEFAULT_ENCODING |
) |
Load a file using the current document value.
Throws if load is unsuccessful.
| encoding | Sets the documents encoding. |
| Exception |
| void ticpp::Document::SaveFile | ( | ) | const |
Save a file using the current document value.
Throws if it can't save the file.
| Exception |
| void ticpp::Document::LoadFile | ( | const std::string & | filename, | |
| TiXmlEncoding | encoding = TIXML_DEFAULT_ENCODING | |||
| ) |
Load a file using the given filename.
Throws if load is unsuccessful.
| filename | File to load. | |
| encoding | Sets the documents encoding. |
| Exception |
| void ticpp::Document::LoadFile | ( | const char * | filename, | |
| TiXmlEncoding | encoding = TIXML_DEFAULT_ENCODING | |||
| ) |
Load a file using the given filename.
Throws if load is unsuccessful.
| filename | File to load. | |
| encoding | Sets the documents encoding. |
| Exception |
| void ticpp::Document::SaveFile | ( | const std::string & | filename | ) | const |
Save a file using the given filename.
Throws if it can't save the file.
| filename | File to save. |
| Exception |
| void ticpp::Document::Parse | ( | const std::string & | xml, | |
| bool | throwIfParseError = true, |
|||
| TiXmlEncoding | encoding = TIXML_DEFAULT_ENCODING | |||
| ) |
Parse the given xml data.
| xml | Xml to parse. | |
| throwIfParseError | [DEF] If true, throws when there is a parse error. | |
| encoding | Sets the documents encoding. |
| Exception |
1.5.6