add obt_parse_save_file() method to the obt parse library

This commit is contained in:
Dana Jansens 2009-12-21 12:59:17 -05:00
parent 7aae8cc526
commit 04dc598a1f
2 changed files with 11 additions and 0 deletions

View 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) {

View 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);