From 6d315d0e61f419636021476582a49ab0b1f1b5e9 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Thu, 5 Aug 2010 16:28:30 -0600 Subject: 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 --- src/utils/xml.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/utils/xml.h') 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 @@ -44,15 +44,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. */ @@ -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) \ -- cgit v1.2.3-70-g09d2