]> Dogcows Code - chaz/openbox/commitdiff
add obt_parse_save_file() method to the obt parse library
authorDana Jansens <danakj@orodu.net>
Mon, 21 Dec 2009 17:59:17 +0000 (12:59 -0500)
committerDana Jansens <danakj@orodu.net>
Mon, 21 Dec 2009 19:08:38 +0000 (14:08 -0500)
obt/parse.c
obt/parse.h

index b7c34ab163122e5cd6d37474ba732245cacfa184..b44e968d589f3ee7bef87dc02347ba4b0a61edb2 100644 (file)
@@ -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) {
index acc3f5c6cc3ed5bfcff1de0139664d86cfb5c852..400acf94eedd4d0d78896f63f1330aeba4cc8dcd 100644 (file)
@@ -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);
 
This page took 0.029462 seconds and 4 git commands to generate.