diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-08-05 16:28:30 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-08-05 16:42:54 -0600 |
commit | 6d315d0e61f419636021476582a49ab0b1f1b5e9 (patch) | |
tree | 38baba0bd749f2e36138f0119bfd13a4f9f1fcdb /src/utils/xml.h | |
parent | c3e9fbfc9a92e5d75a0d1002cfba48947718dc4d (diff) | |
download | mana-6d315d0e61f419636021476582a49ab0b1f1b5e9.tar.gz mana-6d315d0e61f419636021476582a49ab0b1f1b5e9.tar.bz2 mana-6d315d0e61f419636021476582a49ab0b1f1b5e9.tar.xz mana-6d315d0e61f419636021476582a49ab0b1f1b5e9.zip |
Add better XML error logging and do some related cleanup
Error details from libxml2 are no longer ignored and are properly
logged now. XML initialization code is now in the XML namespace.
The XML::Document constructor that took a data pointer was removed
because it wasn't being used and it would make the new logging less
useful (no filename).
Signed-off-by: Chuck Miller
Diffstat (limited to 'src/utils/xml.h')
-rw-r--r-- | src/utils/xml.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/utils/xml.h b/src/utils/xml.h index 72745501..8ffecb76 100644 --- a/src/utils/xml.h +++ b/src/utils/xml.h @@ -45,15 +45,6 @@ namespace XML Document(const std::string &filename, bool useResman = true); /** - * Constructor that attempts to load an XML document from memory. - * Does not log errors. - * - * @param data the string to parse as XML - * @param size the length of the string in bytes - */ - Document(const char *data, int size); - - /** * Destructor. Frees the loaded XML file. */ ~Document(); @@ -88,6 +79,11 @@ namespace XML * Finds the first child node with the given name */ xmlNodePtr findFirstChildByName(xmlNodePtr parent, const char *name); + + /** + * Initializes the XML engine. + */ + void init(); } #define for_each_xml_child_node(var, parent) \ |