XML::Document Class Reference
#include <xml.h>
List of all members.
Detailed Description
A helper class for parsing an
XML document, which also cleans it up again (RAII).
Definition at line 38 of file xml.h.
|
Public Member Functions |
| Document (const std::string &filename) |
| Constructor that attempts to load the given file through the resource manager.
|
| Document (const char *data, int size) |
| Constructor that attempts to load an XML document from memory.
|
| ~Document () |
| Destructor.
|
xmlNodePtr | rootNode () |
| Returns the root node of the document (or NULL if there was a load error).
|
Private Attributes |
xmlDocPtr | mDoc |
Constructor & Destructor Documentation
XML::Document::Document |
( |
const std::string & |
filename |
) |
|
Constructor that attempts to load the given file through the resource manager.
Logs errors.
Definition at line 30 of file xml.cpp.
XML::Document::Document |
( |
const char * |
data, |
|
|
int |
size | |
|
) |
| | |
Constructor that attempts to load an XML document from memory.
Does not log errors.
- Parameters:
-
| data | the string to parse as XML |
| size | the length of the string in bytes |
Definition at line 48 of file xml.cpp.
XML::Document::~Document |
( |
|
) |
|
Destructor.
Frees the loaded XML file.
Definition at line 53 of file xml.cpp.
Member Function Documentation
xmlNodePtr XML::Document::rootNode |
( |
|
) |
|
Returns the root node of the document (or NULL if there was a load error).
Definition at line 59 of file xml.cpp.
Member Data Documentation
Definition at line 68 of file xml.h.
The documentation for this class was generated from the following files: