diff options
-rw-r--r-- | e-util/e-table-specification.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/e-util/e-table-specification.c b/e-util/e-table-specification.c index ff02d3b08e..5554aaa043 100644 --- a/e-util/e-table-specification.c +++ b/e-util/e-table-specification.c @@ -558,20 +558,21 @@ gboolean e_table_specification_load_from_file (ETableSpecification *specification, const gchar *filename) { - xmlDoc *doc; + gchar *contents = NULL; gboolean success = FALSE; g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (specification), FALSE); g_return_val_if_fail (filename != NULL, FALSE); - doc = e_xml_parse_file (filename); - if (doc != NULL) { - xmlNode *node = xmlDocGetRootElement (doc); - e_table_specification_load_from_node (specification, node); - xmlFreeDoc (doc); - success = TRUE; + if (g_file_get_contents (filename, &contents, NULL, NULL)) { + success = e_table_specification_load_from_string ( + specification, contents); + g_free (contents); + contents = NULL; } + g_warn_if_fail (contents == NULL); + return success; } |