1 #include "description_chunks.h"
2 
parse_fb2_book_title(APP * app,xmlNode * parent_node,GtkTextIter * text_buff_end)3 int parse_fb2_book_title(APP* app, xmlNode* parent_node, GtkTextIter* text_buff_end)
4 {
5 	g_return_val_if_fail(parent_node 	!= NULL,	EXIT_FAILURE);
6 	g_return_val_if_fail(text_buff_end 	!= NULL,	EXIT_FAILURE);
7 
8 	xmlNode* node = parent_node->children;
9 
10 	if(node != NULL)
11 	{
12 		char* book_title = (char*)node->content;
13 		app->book_title = g_strdup(book_title);
14 	}
15 	else
16 		g_log(NULL, G_LOG_LEVEL_WARNING, "No content in <book-title> tag");
17 
18 	return EXIT_SUCCESS;
19 }
20