add obt_parse_save_file() method to the obt parse library
This commit is contained in:
parent
7aae8cc526
commit
04dc598a1f
2 changed files with 11 additions and 0 deletions
|
@ -277,6 +277,13 @@ gboolean obt_parse_load_mem(ObtParseInst *i,
|
||||||
return r;
|
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)
|
void obt_parse_close(ObtParseInst *i)
|
||||||
{
|
{
|
||||||
if (i && i->doc) {
|
if (i && i->doc) {
|
||||||
|
|
|
@ -51,6 +51,10 @@ gboolean obt_parse_load_theme_file(ObtParseInst *inst,
|
||||||
gboolean obt_parse_load_mem(ObtParseInst *inst,
|
gboolean obt_parse_load_mem(ObtParseInst *inst,
|
||||||
gpointer data, guint len, const gchar *root_node);
|
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);
|
xmlDocPtr obt_parse_doc(ObtParseInst *inst);
|
||||||
xmlNodePtr obt_parse_root(ObtParseInst *inst);
|
xmlNodePtr obt_parse_root(ObtParseInst *inst);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue