From: Dana Jansens Date: Mon, 21 Dec 2009 17:59:17 +0000 (-0500) Subject: add obt_parse_save_file() method to the obt parse library X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=04dc598a1fb195065403055fbb95589dd3511daa;p=chaz%2Fopenbox add obt_parse_save_file() method to the obt parse library --- diff --git a/obt/parse.c b/obt/parse.c index b7c34ab1..b44e968d 100644 --- a/obt/parse.c +++ b/obt/parse.c @@ -277,6 +277,13 @@ gboolean obt_parse_load_mem(ObtParseInst *i, return r; } +gboolean obt_parse_save_file(ObtParseInst *inst, + const gchar *path, + gboolean pretty) +{ + return xmlSaveFormatFile(path, inst->doc, pretty) != -1; +} + void obt_parse_close(ObtParseInst *i) { if (i && i->doc) { diff --git a/obt/parse.h b/obt/parse.h index acc3f5c6..400acf94 100644 --- a/obt/parse.h +++ b/obt/parse.h @@ -51,6 +51,10 @@ gboolean obt_parse_load_theme_file(ObtParseInst *inst, gboolean obt_parse_load_mem(ObtParseInst *inst, gpointer data, guint len, const gchar *root_node); +gboolean obt_parse_save_file(ObtParseInst *inst, + const gchar *path, + gboolean pretty); + xmlDocPtr obt_parse_doc(ObtParseInst *inst); xmlNodePtr obt_parse_root(ObtParseInst *inst);