Be more lenient with errors in xml file. If there are errors, try to keep loading it anyways.
This commit is contained in:
parent
1cbd7960fb
commit
efedb4df9c
1 changed files with 2 additions and 1 deletions
|
@ -152,7 +152,8 @@ gboolean parse_load(const gchar *path, const gchar *rootname,
|
|||
|
||||
/* XML_PARSE_BLANKS is needed apparently. When it loads a theme file,
|
||||
without this option, the tree is weird and has extra nodes in it. */
|
||||
if ((*doc = xmlReadFile(path, NULL, XML_PARSE_NOBLANKS))) {
|
||||
if ((*doc = xmlReadFile(path, NULL,
|
||||
XML_PARSE_NOBLANKS | XML_PARSE_RECOVER))) {
|
||||
*root = xmlDocGetRootElement(*doc);
|
||||
if (!*root) {
|
||||
xmlFreeDoc(*doc);
|
||||
|
|
Loading…
Reference in a new issue