## XML Category Functions

XML Category Functions — Functions to parse glabels XML category definition files

## Synopsis

    #include <libglabels/lgl-xml-category.h>

    GList *             lgl_xml_category_read_categories_from_file
                                                            (gchar *utf8_filename);
    GList *             lgl_xml_category_parse_categories_doc
                                                            (xmlDocPtr categories_doc);
    lglCategory *       lgl_xml_category_parse_category_node
                                                            (xmlNodePtr category_node);

## Description

This section describes a number of functions for parsing glabels XML category definition files.

## Details

### lgl_xml_category_read_categories_from_file ()

    GList *             lgl_xml_category_read_categories_from_file
                                                            (gchar *utf8_filename);

Read category definitions from a file.

`utf8_filename` : | Filename of categories file (name encoded as UTF-8)
Returns : | a list of lglCategory structures.

### lgl_xml_category_parse_categories_doc ()

    GList *             lgl_xml_category_parse_categories_doc
                                                            (xmlDocPtr categories_doc);

Read category definitions from a libxml xmlDocPtr tree.

`categories_doc` : | libxml xmlDocPtr tree, representing a categories definition file.
Returns : | a list of lglCategory structures.

### lgl_xml_category_parse_category_node ()

    lglCategory *       lgl_xml_category_parse_category_node
                                                            (xmlNodePtr category_node);

Read a single category definition from a libxml xmlNodePtr node.

`category_node` : | libxml xmlNodePtr category node from a xmlDocPtr tree.
Returns : | a pointer to a newly created lglCategory structure.