diff --git a/libgnucash/backend/xml/gnc-book-xml-v2.cpp b/libgnucash/backend/xml/gnc-book-xml-v2.cpp index ed8416b9cf..529eb2d933 100644 --- a/libgnucash/backend/xml/gnc-book-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-book-xml-v2.cpp @@ -60,45 +60,6 @@ static QofLogModule log_module = GNC_MOD_IO; /* ================================================================ */ -#ifdef IMPLEMENT_BOOK_DOM_TREES_LATER - -static void -append_account_tree (xmlNodePtr parent, - Account* account, - gboolean allow_incompat) -{ - GList* children, *node; - - children = gnc_account_get_children (account); - children = g_list_sort (children, qof_instance_guid_compare); - for (node = children; node; node = node->next) - { - xmlNodePtr accnode; - Account* account; - - account = node->data; - accnode = gnc_account_dom_tree_create (account, FALSE, allow_incompat); - xmlAddChild (parent, accnode); - append_account_tree (accnode, account); - } - g_list_free (children); -} - -static int -traverse_txns (Transaction* txn, gpointer data) -{ - xmlNodePtr node; - xmlNodePtr parent = data; - - node = gnc_transaction_dom_tree_create (txn); - xmlAddChild (parent, node); - - return 0; -} -#endif - -/* ================================================================ */ - xmlNodePtr gnc_book_dom_tree_create (QofBook* book) { @@ -115,32 +76,6 @@ gnc_book_dom_tree_create (QofBook* book) xmlAddChild (ret, qof_instance_slots_to_dom_tree (book_slots_string, QOF_INSTANCE (book))); -#ifdef IMPLEMENT_BOOK_DOM_TREES_LATER - /* theoretically, we should be adding all the below to the book - * but in fact, there's enough brain damage in the code already - * that we are only going to hand-edit the file at a higher layer. - * And that's OK, since its probably a performance boost anyway. - */ - xmlAddChild (ret, gnc_commodity_dom_tree_create ( - gnc_commodity_table_get_table (book))); - xmlAddChild (ret, gnc_pricedb_dom_tree_create (gnc_pricedb_get_db (book))); - if (allow_incompat) - { - accnode = gnc_account_dom_tree_create (account, FALSE); - xmlAddChild (ret, rootAccNode); - } - append_account_tree (ret, gnc_book_get_root (book)); - - xaccAccountTreeForEachTransaction (gnc_book_get_root_account (book), - traverse_txns, ret); - - /* xxx FIXME hack alert how are we going to handle - * gnc_book_get_template_group handled ??? */ - xmlAddChild (ret, gnc_schedXaction_dom_tree_create ( - gnc_book_get_schedxactions (book))); - -#endif - return ret; } diff --git a/libgnucash/backend/xml/io-gncxml-v2.cpp b/libgnucash/backend/xml/io-gncxml-v2.cpp index 3b2c0b35f5..8f42abe843 100644 --- a/libgnucash/backend/xml/io-gncxml-v2.cpp +++ b/libgnucash/backend/xml/io-gncxml-v2.cpp @@ -981,31 +981,6 @@ write_book (FILE* out, QofBook* book, sixtp_gdv2* gd) { struct file_backend be_data; -#ifdef IMPLEMENT_BOOK_DOM_TREES_LATER - /* We can't just blast out the dom tree, because the dom tree - * doesn't have the books, transactions, etc underneath it. - * But that is just as well, since I think the performance - * will be much better if we write out as we go along - */ - xmlNodePtr node; - - node = gnc_book_dom_tree_create (book); - - if (!node) - { - return FALSE; - } - - xmlElemDump (out, NULL, node); - xmlFreeNode (node); - - if (ferror (out) || fprintf (out, "\n") < 0) - { - return FALSE; - } - -#endif - be_data.out = out; be_data.book = book; be_data.gd = gd;