From bffafedbd3474901f005b43e3ddf37eef7752e9f Mon Sep 17 00:00:00 2001 From: louis Date: Sat, 11 Jul 2015 13:28:19 +0200 Subject: changed skinrepository from static file to github repository --- libcore/libxmlwrapper.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libcore/libxmlwrapper.c') diff --git a/libcore/libxmlwrapper.c b/libcore/libxmlwrapper.c index 565c12c..0a93dfd 100644 --- a/libcore/libxmlwrapper.c +++ b/libcore/libxmlwrapper.c @@ -37,7 +37,7 @@ void cLibXMLWrapper::DeleteDocument(void) { nodeStack.pop(); } -bool cLibXMLWrapper::ReadXMLFile(const char *path) { +bool cLibXMLWrapper::ReadXMLFile(const char *path, bool validate) { if (!ctxt) { esyslog("skindesigner: Failed to allocate parser context"); return false; @@ -46,7 +46,11 @@ bool cLibXMLWrapper::ReadXMLFile(const char *path) { dsyslog("skindesigner: reading XML Template %s failed", path); return false; } - doc = xmlCtxtReadFile(ctxt, path, NULL, XML_PARSE_NOENT | XML_PARSE_DTDVALID); + if (validate) + doc = xmlCtxtReadFile(ctxt, path, NULL, XML_PARSE_NOENT | XML_PARSE_DTDVALID); + else + doc = xmlCtxtReadFile(ctxt, path, NULL, XML_PARSE_NOENT); + if (!doc) { dsyslog("skindesigner: reading XML Template %s failed", path); return false; @@ -180,5 +184,6 @@ bool cLibXMLWrapper::GetNodeValue(string &value) { xmlFree(val); return true; } + value = ""; return false; } -- cgit v1.2.3