/* DomCollections.c generated by valac 0.56.19, the Vala compiler
 * generated from DomCollections.vala, do not modify */

/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
/*
 *
 * Copyright (C) 2016  Daniel Espinosa <esodan@gmail.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.

 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
 *
 * Authors:
 *      Daniel Espinosa <esodan@gmail.com>
 */

#include "gxml/gxml.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gee.h>
#include <glib-object.h>
#include "gxml.h"

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	GXML_DOM_NODE_ITERATOR_ACCEPT_NODE_SIGNAL,
	GXML_DOM_NODE_ITERATOR_NUM_SIGNALS
};
static guint gxml_dom_node_iterator_signals[GXML_DOM_NODE_ITERATOR_NUM_SIGNALS] = {0};
enum  {
	GXML_DOM_NODE_FILTER_0_PROPERTY,
	GXML_DOM_NODE_FILTER_NUM_PROPERTIES
};
static GParamSpec* gxml_dom_node_filter_properties[GXML_DOM_NODE_FILTER_NUM_PROPERTIES];
enum  {
	GXML_DOM_TREE_WALKER_ACCEPT_NODE_SIGNAL,
	GXML_DOM_TREE_WALKER_NUM_SIGNALS
};
static guint gxml_dom_tree_walker_signals[GXML_DOM_TREE_WALKER_NUM_SIGNALS] = {0};

static gpointer gxml_dom_node_filter_parent_class = NULL;

static GType gxml_dom_non_element_parent_node_get_type_once (void);
static GXmlDomElement* gxml_dom_parent_node_real_query_selector (GXmlDomParentNode* self,
                                                          const gchar* selectors,
                                                          GError** error);
static GXmlDomElementList* gxml_dom_parent_node_real_get_elements_by_property_value (GXmlDomParentNode* self,
                                                                              const gchar* property,
                                                                              const gchar* value);
static GType gxml_dom_parent_node_get_type_once (void);
static GType gxml_dom_non_document_type_child_node_get_type_once (void);
static GType gxml_dom_child_node_get_type_once (void);
static GType gxml_dom_node_list_get_type_once (void);
static GXmlDomElement** gxml_dom_html_collection_real_to_array (GXmlDomHTMLCollection* self,
                                                         gint* result_length1);
static GXmlDomElement* gxml_dom_html_collection_real_item (GXmlDomHTMLCollection* self,
                                                    gint index);
static GXmlDomElement* gxml_dom_html_collection_real_named_item (GXmlDomHTMLCollection* self,
                                                          const gchar* name);
static GType gxml_dom_html_collection_get_type_once (void);
static void g_cclosure_user_marshal_ENUM__OBJECT (GClosure * closure,
                                           GValue * return_value,
                                           guint n_param_values,
                                           const GValue * param_values,
                                           gpointer invocation_hint,
                                           gpointer marshal_data);
static GType gxml_dom_node_iterator_get_type_once (void);
static GType gxml_dom_node_filter_get_type_once (void);
static GType gxml_dom_tree_walker_get_type_once (void);
static GType gxml_dom_named_node_map_get_type_once (void);
static GType gxml_dom_token_list_get_type_once (void);
static GType gxml_dom_settable_token_list_get_type_once (void);

GXmlDomElement*
gxml_dom_non_element_parent_node_get_element_by_id (GXmlDomNonElementParentNode* self,
                                                    const gchar* element_id,
                                                    GError** error)
{
	GXmlDomNonElementParentNodeIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_NON_ELEMENT_PARENT_NODE_GET_INTERFACE (self);
	if (_iface_->get_element_by_id) {
		return _iface_->get_element_by_id (self, element_id, error);
	}
	return NULL;
}

static void
gxml_dom_non_element_parent_node_default_init (GXmlDomNonElementParentNodeIface * iface,
                                               gpointer iface_data)
{
}

static GType
gxml_dom_non_element_parent_node_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GXmlDomNonElementParentNodeIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_dom_non_element_parent_node_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gxml_dom_non_element_parent_node_type_id;
	gxml_dom_non_element_parent_node_type_id = g_type_register_static (G_TYPE_INTERFACE, "GXmlDomNonElementParentNode", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gxml_dom_non_element_parent_node_type_id, G_TYPE_OBJECT);
	return gxml_dom_non_element_parent_node_type_id;
}

GType
gxml_dom_non_element_parent_node_get_type (void)
{
	static volatile gsize gxml_dom_non_element_parent_node_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_non_element_parent_node_type_id__once)) {
		GType gxml_dom_non_element_parent_node_type_id;
		gxml_dom_non_element_parent_node_type_id = gxml_dom_non_element_parent_node_get_type_once ();
		g_once_init_leave (&gxml_dom_non_element_parent_node_type_id__once, gxml_dom_non_element_parent_node_type_id);
	}
	return gxml_dom_non_element_parent_node_type_id__once;
}

GXmlDomHTMLCollection*
gxml_dom_parent_node_get_children (GXmlDomParentNode* self)
{
	GXmlDomParentNodeIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_PARENT_NODE_GET_INTERFACE (self);
	if (_iface_->get_children) {
		return _iface_->get_children (self);
	}
	return NULL;
}

GXmlDomElement*
gxml_dom_parent_node_get_first_element_child (GXmlDomParentNode* self)
{
	GXmlDomParentNodeIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_PARENT_NODE_GET_INTERFACE (self);
	if (_iface_->get_first_element_child) {
		return _iface_->get_first_element_child (self);
	}
	return NULL;
}

GXmlDomElement*
gxml_dom_parent_node_get_last_element_child (GXmlDomParentNode* self)
{
	GXmlDomParentNodeIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_PARENT_NODE_GET_INTERFACE (self);
	if (_iface_->get_last_element_child) {
		return _iface_->get_last_element_child (self);
	}
	return NULL;
}

gint
gxml_dom_parent_node_get_child_element_count (GXmlDomParentNode* self)
{
	GXmlDomParentNodeIface* _iface_;
	g_return_val_if_fail (self != NULL, -1);
	_iface_ = GXML_DOM_PARENT_NODE_GET_INTERFACE (self);
	if (_iface_->get_child_element_count) {
		return _iface_->get_child_element_count (self);
	}
	return -1;
}

/**
   * Select first matched {@link GXml.DomElement} if exists.
   * @param selectors valid CSS Level 3 selectors.
   * @return first matched {@link GXml.DomElement}, or null if nodes aren't found.
   */
static GXmlDomElement*
gxml_dom_parent_node_real_query_selector (GXmlDomParentNode* self,
                                          const gchar* selectors,
                                          GError** error)
{
	GXmlDomNodeList* list = NULL;
	GXmlDomNodeList* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	GXmlDomNode* _tmp3_;
	GXmlDomElement* _tmp4_;
	GError* _inner_error0_ = NULL;
	GXmlDomElement* result;
	g_return_val_if_fail (selectors != NULL, NULL);
	_tmp0_ = gxml_dom_parent_node_query_selector_all (self, selectors, &_inner_error0_);
	list = _tmp0_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	_tmp1_ = gee_collection_get_size ((GeeCollection*) list);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == 0) {
		result = NULL;
		_g_object_unref0 (list);
		return result;
	}
	_tmp3_ = gxml_dom_node_list_item (list, 0);
	_tmp4_ = GXML_IS_DOM_ELEMENT (_tmp3_) ? ((GXmlDomElement*) _tmp3_) : NULL;
	if (_tmp4_ == NULL) {
		_g_object_unref0 (_tmp3_);
	}
	result = _tmp4_;
	_g_object_unref0 (list);
	return result;
}

GXmlDomElement*
gxml_dom_parent_node_query_selector (GXmlDomParentNode* self,
                                     const gchar* selectors,
                                     GError** error)
{
	GXmlDomParentNodeIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_PARENT_NODE_GET_INTERFACE (self);
	if (_iface_->query_selector) {
		return _iface_->query_selector (self, selectors, error);
	}
	return NULL;
}

/**
   * Select all {@link GXml.DomElement} child and descendents that match CSS Level 3 selectors.
   * @param selectors valid CSS Level 3 selectors.
   * @return a {@link GXml.DomNodeList} with all matched nodes, or throw an Error if selectors are invalid. 
   */
GXmlDomNodeList*
gxml_dom_parent_node_query_selector_all (GXmlDomParentNode* self,
                                         const gchar* selectors,
                                         GError** error)
{
	GXmlDomParentNodeIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_PARENT_NODE_GET_INTERFACE (self);
	if (_iface_->query_selector_all) {
		return _iface_->query_selector_all (self, selectors, error);
	}
	return NULL;
}

/**
   * Search all child {@link GXml.Element} with a given property's name and with
   * value contained in text.
   */
static GXmlDomElementList*
gxml_dom_parent_node_real_get_elements_by_property_value (GXmlDomParentNode* self,
                                                          const gchar* property,
                                                          const gchar* value)
{
	GXmlDomElementList* list = NULL;
	GXmlDomElementList* _tmp0_;
	GXmlDomElementList* result;
	g_return_val_if_fail (property != NULL, NULL);
	g_return_val_if_fail (value != NULL, NULL);
	_tmp0_ = gxml_dom_element_list_new ();
	list = _tmp0_;
	{
		GXmlDomHTMLCollection* _child_list = NULL;
		GXmlDomHTMLCollection* _tmp1_;
		GXmlDomHTMLCollection* _tmp2_;
		gint _child_size = 0;
		GXmlDomHTMLCollection* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _child_index = 0;
		_tmp1_ = gxml_dom_parent_node_get_children (self);
		_tmp2_ = _tmp1_;
		_child_list = _tmp2_;
		_tmp3_ = _child_list;
		_tmp4_ = gee_collection_get_size ((GeeCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_child_size = _tmp5_;
		_child_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			GXmlDomElement* child = NULL;
			GXmlDomHTMLCollection* _tmp8_;
			gpointer _tmp9_;
			GXmlDomElement* _tmp10_;
			GXmlDomElementList* _tmp11_;
			GXmlDomElement* _tmp12_;
			GXmlDomElementList* _tmp13_;
			GXmlDomElementList* _tmp14_;
			GXmlDomElement* _tmp15_;
			GXmlDomNamedNodeMap* _tmp16_;
			GXmlDomNamedNodeMap* _tmp17_;
			GXmlDomNamedNodeMap* _tmp18_;
			gboolean _tmp19_;
			gchar* cls = NULL;
			GXmlDomElement* _tmp20_;
			gchar* _tmp21_;
			const gchar* _tmp22_;
			const gchar* _tmp23_;
			_child_index = _child_index + 1;
			_tmp6_ = _child_index;
			_tmp7_ = _child_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _child_list;
			_tmp9_ = gee_list_get ((GeeList*) _tmp8_, _child_index);
			child = (GXmlDomElement*) _tmp9_;
			_tmp10_ = child;
			if (_tmp10_ == NULL) {
				_g_object_unref0 (child);
				continue;
			}
			_tmp11_ = list;
			_tmp12_ = child;
			_tmp13_ = gxml_dom_parent_node_get_elements_by_property_value ((GXmlDomParentNode*) _tmp12_, property, value);
			_tmp14_ = _tmp13_;
			gee_array_list_add_all ((GeeArrayList*) _tmp11_, (GeeCollection*) _tmp14_);
			_g_object_unref0 (_tmp14_);
			_tmp15_ = child;
			_tmp16_ = gxml_dom_element_get_attributes (_tmp15_);
			_tmp17_ = _tmp16_;
			_tmp18_ = _tmp17_;
			_tmp19_ = _tmp18_ == NULL;
			_g_object_unref0 (_tmp18_);
			if (_tmp19_) {
				_g_object_unref0 (child);
				continue;
			}
			_tmp20_ = child;
			_tmp21_ = gxml_dom_element_get_attribute (_tmp20_, property);
			cls = _tmp21_;
			_tmp22_ = cls;
			if (_tmp22_ == NULL) {
				_g_free0 (cls);
				_g_object_unref0 (child);
				continue;
			}
			_tmp23_ = cls;
			if (g_strcmp0 (value, _tmp23_) == 0) {
				GXmlDomElementList* _tmp24_;
				GXmlDomElement* _tmp25_;
				_tmp24_ = list;
				_tmp25_ = child;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp24_, G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, GXML_TYPE_DOM_ELEMENT, GXmlDomElement));
			}
			_g_free0 (cls);
			_g_object_unref0 (child);
		}
		_g_object_unref0 (_child_list);
	}
	result = list;
	return result;
}

GXmlDomElementList*
gxml_dom_parent_node_get_elements_by_property_value (GXmlDomParentNode* self,
                                                     const gchar* property,
                                                     const gchar* value)
{
	GXmlDomParentNodeIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_PARENT_NODE_GET_INTERFACE (self);
	if (_iface_->get_elements_by_property_value) {
		return _iface_->get_elements_by_property_value (self, property, value);
	}
	return NULL;
}

static void
gxml_dom_parent_node_default_init (GXmlDomParentNodeIface * iface,
                                   gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_object ("children", "children", "children", GXML_TYPE_DOM_HTML_COLLECTION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_object ("first-element-child", "first-element-child", "first-element-child", GXML_TYPE_DOM_ELEMENT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_object ("last-element-child", "last-element-child", "last-element-child", GXML_TYPE_DOM_ELEMENT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_int ("child-element-count", "child-element-count", "child-element-count", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	iface->query_selector = gxml_dom_parent_node_real_query_selector;
	iface->get_elements_by_property_value = gxml_dom_parent_node_real_get_elements_by_property_value;
}

static GType
gxml_dom_parent_node_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GXmlDomParentNodeIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_dom_parent_node_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gxml_dom_parent_node_type_id;
	gxml_dom_parent_node_type_id = g_type_register_static (G_TYPE_INTERFACE, "GXmlDomParentNode", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gxml_dom_parent_node_type_id, G_TYPE_OBJECT);
	return gxml_dom_parent_node_type_id;
}

GType
gxml_dom_parent_node_get_type (void)
{
	static volatile gsize gxml_dom_parent_node_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_parent_node_type_id__once)) {
		GType gxml_dom_parent_node_type_id;
		gxml_dom_parent_node_type_id = gxml_dom_parent_node_get_type_once ();
		g_once_init_leave (&gxml_dom_parent_node_type_id__once, gxml_dom_parent_node_type_id);
	}
	return gxml_dom_parent_node_type_id__once;
}

GXmlDomElement*
gxml_dom_non_document_type_child_node_get_previous_element_sibling (GXmlDomNonDocumentTypeChildNode* self)
{
	GXmlDomNonDocumentTypeChildNodeIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_NON_DOCUMENT_TYPE_CHILD_NODE_GET_INTERFACE (self);
	if (_iface_->get_previous_element_sibling) {
		return _iface_->get_previous_element_sibling (self);
	}
	return NULL;
}

GXmlDomElement*
gxml_dom_non_document_type_child_node_get_next_element_sibling (GXmlDomNonDocumentTypeChildNode* self)
{
	GXmlDomNonDocumentTypeChildNodeIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_NON_DOCUMENT_TYPE_CHILD_NODE_GET_INTERFACE (self);
	if (_iface_->get_next_element_sibling) {
		return _iface_->get_next_element_sibling (self);
	}
	return NULL;
}

static void
gxml_dom_non_document_type_child_node_default_init (GXmlDomNonDocumentTypeChildNodeIface * iface,
                                                    gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_object ("previous-element-sibling", "previous-element-sibling", "previous-element-sibling", GXML_TYPE_DOM_ELEMENT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_object ("next-element-sibling", "next-element-sibling", "next-element-sibling", GXML_TYPE_DOM_ELEMENT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static GType
gxml_dom_non_document_type_child_node_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GXmlDomNonDocumentTypeChildNodeIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_dom_non_document_type_child_node_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gxml_dom_non_document_type_child_node_type_id;
	gxml_dom_non_document_type_child_node_type_id = g_type_register_static (G_TYPE_INTERFACE, "GXmlDomNonDocumentTypeChildNode", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gxml_dom_non_document_type_child_node_type_id, G_TYPE_OBJECT);
	return gxml_dom_non_document_type_child_node_type_id;
}

GType
gxml_dom_non_document_type_child_node_get_type (void)
{
	static volatile gsize gxml_dom_non_document_type_child_node_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_non_document_type_child_node_type_id__once)) {
		GType gxml_dom_non_document_type_child_node_type_id;
		gxml_dom_non_document_type_child_node_type_id = gxml_dom_non_document_type_child_node_get_type_once ();
		g_once_init_leave (&gxml_dom_non_document_type_child_node_type_id__once, gxml_dom_non_document_type_child_node_type_id);
	}
	return gxml_dom_non_document_type_child_node_type_id__once;
}

void
gxml_dom_child_node_remove (GXmlDomChildNode* self)
{
	GXmlDomChildNodeIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GXML_DOM_CHILD_NODE_GET_INTERFACE (self);
	if (_iface_->remove) {
		_iface_->remove (self);
	}
}

static void
gxml_dom_child_node_default_init (GXmlDomChildNodeIface * iface,
                                  gpointer iface_data)
{
}

static GType
gxml_dom_child_node_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GXmlDomChildNodeIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_dom_child_node_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gxml_dom_child_node_type_id;
	gxml_dom_child_node_type_id = g_type_register_static (G_TYPE_INTERFACE, "GXmlDomChildNode", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gxml_dom_child_node_type_id, G_TYPE_OBJECT);
	return gxml_dom_child_node_type_id;
}

GType
gxml_dom_child_node_get_type (void)
{
	static volatile gsize gxml_dom_child_node_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_child_node_type_id__once)) {
		GType gxml_dom_child_node_type_id;
		gxml_dom_child_node_type_id = gxml_dom_child_node_get_type_once ();
		g_once_init_leave (&gxml_dom_child_node_type_id__once, gxml_dom_child_node_type_id);
	}
	return gxml_dom_child_node_type_id__once;
}

GXmlDomNode*
gxml_dom_node_list_item (GXmlDomNodeList* self,
                         gint index)
{
	GXmlDomNodeListIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_NODE_LIST_GET_INTERFACE (self);
	if (_iface_->item) {
		return _iface_->item (self, index);
	}
	return NULL;
}

gint
gxml_dom_node_list_get_length (GXmlDomNodeList* self)
{
	GXmlDomNodeListIface* _iface_;
	g_return_val_if_fail (self != NULL, -1);
	_iface_ = GXML_DOM_NODE_LIST_GET_INTERFACE (self);
	if (_iface_->get_length) {
		return _iface_->get_length (self);
	}
	return -1;
}

static void
gxml_dom_node_list_default_init (GXmlDomNodeListIface * iface,
                                 gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_int ("length", "length", "length", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static GType
gxml_dom_node_list_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GXmlDomNodeListIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_dom_node_list_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gxml_dom_node_list_type_id;
	gxml_dom_node_list_type_id = g_type_register_static (G_TYPE_INTERFACE, "GXmlDomNodeList", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gxml_dom_node_list_type_id, G_TYPE_OBJECT);
	g_type_interface_add_prerequisite (gxml_dom_node_list_type_id, GEE_TYPE_BIDIR_LIST);
	return gxml_dom_node_list_type_id;
}

GType
gxml_dom_node_list_get_type (void)
{
	static volatile gsize gxml_dom_node_list_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_node_list_type_id__once)) {
		GType gxml_dom_node_list_type_id;
		gxml_dom_node_list_type_id = gxml_dom_node_list_get_type_once ();
		g_once_init_leave (&gxml_dom_node_list_type_id__once, gxml_dom_node_list_type_id);
	}
	return gxml_dom_node_list_type_id__once;
}

GXmlDomElement*
gxml_dom_html_collection_get_element (GXmlDomHTMLCollection* self,
                                      gint index)
{
	GXmlDomHTMLCollectionIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_HTML_COLLECTION_GET_INTERFACE (self);
	if (_iface_->get_element) {
		return _iface_->get_element (self, index);
	}
	return NULL;
}

static GXmlDomElement**
gxml_dom_html_collection_real_to_array (GXmlDomHTMLCollection* self,
                                        gint* result_length1)
{
	gint _tmp0_ = 0;
	gpointer* _tmp1_;
	GXmlDomElement** _tmp2_;
	gint _tmp2__length1;
	GXmlDomElement** result;
	_tmp1_ = gee_collection_to_array (G_TYPE_CHECK_INSTANCE_CAST (self, GEE_TYPE_COLLECTION, GeeCollection), &_tmp0_);
	_tmp2_ = (GXmlDomElement**) _tmp1_;
	_tmp2__length1 = (_tmp0_ * sizeof (GXmlDomElement*)) / sizeof (GXmlDomElement*);
	if (result_length1) {
		*result_length1 = _tmp2__length1;
	}
	result = _tmp2_;
	return result;
}

GXmlDomElement**
gxml_dom_html_collection_to_array (GXmlDomHTMLCollection* self,
                                   gint* result_length1)
{
	GXmlDomHTMLCollectionIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_HTML_COLLECTION_GET_INTERFACE (self);
	if (_iface_->to_array) {
		return _iface_->to_array (self, result_length1);
	}
	return NULL;
}

gint
gxml_dom_html_collection_get_length (GXmlDomHTMLCollection* self)
{
	GXmlDomHTMLCollectionIface* _iface_;
	g_return_val_if_fail (self != NULL, -1);
	_iface_ = GXML_DOM_HTML_COLLECTION_GET_INTERFACE (self);
	if (_iface_->get_length) {
		return _iface_->get_length (self);
	}
	return -1;
}

static gint
gxml_dom_html_collection_real_get_length (GXmlDomHTMLCollection* base)
{
	gint result;
	GXmlDomHTMLCollection* self;
	gint _tmp0_;
	gint _tmp1_;
	self = base;
	_tmp0_ = gee_collection_get_size ((GeeCollection*) self);
	_tmp1_ = _tmp0_;
	result = (gint) _tmp1_;
	return result;
}

static GXmlDomElement*
gxml_dom_html_collection_real_item (GXmlDomHTMLCollection* self,
                                    gint index)
{
	gpointer _tmp0_;
	GXmlDomElement* result;
	_tmp0_ = gee_list_get ((GeeList*) self, (gint) index);
	result = (GXmlDomElement*) _tmp0_;
	return result;
}

GXmlDomElement*
gxml_dom_html_collection_item (GXmlDomHTMLCollection* self,
                               gint index)
{
	GXmlDomHTMLCollectionIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_HTML_COLLECTION_GET_INTERFACE (self);
	if (_iface_->item) {
		return _iface_->item (self, index);
	}
	return NULL;
}

static GXmlDomElement*
gxml_dom_html_collection_real_named_item (GXmlDomHTMLCollection* self,
                                          const gchar* name)
{
	GXmlDomElement* result;
	g_return_val_if_fail (name != NULL, NULL);
	{
		GXmlDomHTMLCollection* _e_list = NULL;
		gint _e_size = 0;
		GXmlDomHTMLCollection* _tmp0_;
		gint _tmp1_;
		gint _tmp2_;
		gint _e_index = 0;
		_e_list = self;
		_tmp0_ = _e_list;
		_tmp1_ = gee_collection_get_size ((GeeCollection*) _tmp0_);
		_tmp2_ = _tmp1_;
		_e_size = _tmp2_;
		_e_index = -1;
		while (TRUE) {
			gint _tmp3_;
			gint _tmp4_;
			GXmlDomElement* e = NULL;
			GXmlDomHTMLCollection* _tmp5_;
			gpointer _tmp6_;
			GXmlDomElement* _tmp7_;
			gchar* _tmp8_;
			gchar* _tmp9_;
			gchar* _tmp10_;
			gboolean _tmp11_;
			_e_index = _e_index + 1;
			_tmp3_ = _e_index;
			_tmp4_ = _e_size;
			if (!(_tmp3_ < _tmp4_)) {
				break;
			}
			_tmp5_ = _e_list;
			_tmp6_ = gee_list_get ((GeeList*) _tmp5_, _e_index);
			e = (GXmlDomElement*) _tmp6_;
			_tmp7_ = e;
			_tmp8_ = gxml_dom_node_get_node_name ((GXmlDomNode*) _tmp7_);
			_tmp9_ = _tmp8_;
			_tmp10_ = _tmp9_;
			_tmp11_ = g_strcmp0 (_tmp10_, name) == 0;
			_g_free0 (_tmp10_);
			if (_tmp11_) {
				result = e;
				return result;
			}
			_g_object_unref0 (e);
		}
	}
	result = NULL;
	return result;
}

GXmlDomElement*
gxml_dom_html_collection_named_item (GXmlDomHTMLCollection* self,
                                     const gchar* name)
{
	GXmlDomHTMLCollectionIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_HTML_COLLECTION_GET_INTERFACE (self);
	if (_iface_->named_item) {
		return _iface_->named_item (self, name);
	}
	return NULL;
}

static void
gxml_dom_html_collection_default_init (GXmlDomHTMLCollectionIface * iface,
                                       gpointer iface_data)
{
	iface->to_array = gxml_dom_html_collection_real_to_array;
	iface->item = gxml_dom_html_collection_real_item;
	iface->named_item = gxml_dom_html_collection_real_named_item;
	iface->get_length = gxml_dom_html_collection_real_get_length;
}

static GType
gxml_dom_html_collection_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GXmlDomHTMLCollectionIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_dom_html_collection_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gxml_dom_html_collection_type_id;
	gxml_dom_html_collection_type_id = g_type_register_static (G_TYPE_INTERFACE, "GXmlDomHTMLCollection", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gxml_dom_html_collection_type_id, G_TYPE_OBJECT);
	g_type_interface_add_prerequisite (gxml_dom_html_collection_type_id, GEE_TYPE_BIDIR_LIST);
	return gxml_dom_html_collection_type_id;
}

GType
gxml_dom_html_collection_get_type (void)
{
	static volatile gsize gxml_dom_html_collection_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_html_collection_type_id__once)) {
		GType gxml_dom_html_collection_type_id;
		gxml_dom_html_collection_type_id = gxml_dom_html_collection_get_type_once ();
		g_once_init_leave (&gxml_dom_html_collection_type_id__once, gxml_dom_html_collection_type_id);
	}
	return gxml_dom_html_collection_type_id__once;
}

GXmlDomNode*
gxml_dom_node_iterator_get_root (GXmlDomNodeIterator* self)
{
	GXmlDomNodeIteratorIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_NODE_ITERATOR_GET_INTERFACE (self);
	if (_iface_->get_root) {
		return _iface_->get_root (self);
	}
	return NULL;
}

GXmlDomNode*
gxml_dom_node_iterator_get_reference_node (GXmlDomNodeIterator* self)
{
	GXmlDomNodeIteratorIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_NODE_ITERATOR_GET_INTERFACE (self);
	if (_iface_->get_reference_node) {
		return _iface_->get_reference_node (self);
	}
	return NULL;
}

gboolean
gxml_dom_node_iterator_get_pointer_before_reference_node (GXmlDomNodeIterator* self)
{
	GXmlDomNodeIteratorIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = GXML_DOM_NODE_ITERATOR_GET_INTERFACE (self);
	if (_iface_->get_pointer_before_reference_node) {
		return _iface_->get_pointer_before_reference_node (self);
	}
	return FALSE;
}

gint
gxml_dom_node_iterator_get_what_to_show (GXmlDomNodeIterator* self)
{
	GXmlDomNodeIteratorIface* _iface_;
	g_return_val_if_fail (self != NULL, -1);
	_iface_ = GXML_DOM_NODE_ITERATOR_GET_INTERFACE (self);
	if (_iface_->get_what_to_show) {
		return _iface_->get_what_to_show (self);
	}
	return -1;
}

static void
g_cclosure_user_marshal_ENUM__OBJECT (GClosure * closure,
                                      GValue * return_value,
                                      guint n_param_values,
                                      const GValue * param_values,
                                      gpointer invocation_hint,
                                      gpointer marshal_data)
{
	typedef gint (*GMarshalFunc_ENUM__OBJECT) (gpointer data1, gpointer arg_1, gpointer data2);
	register GMarshalFunc_ENUM__OBJECT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	gint v_return;
	cc = (GCClosure *) closure;
	g_return_if_fail (return_value != NULL);
	g_return_if_fail (n_param_values == 2);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_ENUM__OBJECT) (marshal_data ? marshal_data : cc->callback);
	v_return = callback (data1, g_value_get_object (param_values + 1), data2);
	g_value_set_enum (return_value, v_return);
}

GXmlDomNode*
gxml_dom_node_iterator_next_node (GXmlDomNodeIterator* self)
{
	GXmlDomNodeIteratorIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_NODE_ITERATOR_GET_INTERFACE (self);
	if (_iface_->next_node) {
		return _iface_->next_node (self);
	}
	return NULL;
}

GXmlDomNode*
gxml_dom_node_iterator_previous_node (GXmlDomNodeIterator* self)
{
	GXmlDomNodeIteratorIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_NODE_ITERATOR_GET_INTERFACE (self);
	if (_iface_->previous_node) {
		return _iface_->previous_node (self);
	}
	return NULL;
}

void
gxml_dom_node_iterator_detach (GXmlDomNodeIterator* self)
{
	GXmlDomNodeIteratorIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GXML_DOM_NODE_ITERATOR_GET_INTERFACE (self);
	if (_iface_->detach) {
		_iface_->detach (self);
	}
}

static void
gxml_dom_node_iterator_default_init (GXmlDomNodeIteratorIface * iface,
                                     gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_object ("root", "root", "root", GXML_TYPE_DOM_NODE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_object ("reference-node", "reference-node", "reference-node", GXML_TYPE_DOM_NODE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_boolean ("pointer-before-reference-node", "pointer-before-reference-node", "pointer-before-reference-node", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/**
	   * This is a value of {@link DomNodeFilter} constant SHOW.
	   */
	g_object_interface_install_property (iface, g_param_spec_int ("what-to-show", "what-to-show", "what-to-show", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	gxml_dom_node_iterator_signals[GXML_DOM_NODE_ITERATOR_ACCEPT_NODE_SIGNAL] = g_signal_new ("accept-node", GXML_TYPE_DOM_NODE_ITERATOR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_ENUM__OBJECT, GXML_DOM_NODE_FILTER_TYPE_FILTER, 1, GXML_TYPE_DOM_NODE);
}

/**
 * Document's node iterator.
 *
 * If you want to filter while you go though the tree
 * set a handler for the {@link accept_node} signal
 */
static GType
gxml_dom_node_iterator_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GXmlDomNodeIteratorIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_dom_node_iterator_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gxml_dom_node_iterator_type_id;
	gxml_dom_node_iterator_type_id = g_type_register_static (G_TYPE_INTERFACE, "GXmlDomNodeIterator", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gxml_dom_node_iterator_type_id, G_TYPE_OBJECT);
	return gxml_dom_node_iterator_type_id;
}

GType
gxml_dom_node_iterator_get_type (void)
{
	static volatile gsize gxml_dom_node_iterator_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_node_iterator_type_id__once)) {
		GType gxml_dom_node_iterator_type_id;
		gxml_dom_node_iterator_type_id = gxml_dom_node_iterator_get_type_once ();
		g_once_init_leave (&gxml_dom_node_iterator_type_id__once, gxml_dom_node_iterator_type_id);
	}
	return gxml_dom_node_iterator_type_id__once;
}

static GType
gxml_dom_node_filter_filter_get_type_once (void)
{
	static const GEnumValue values[] = {{GXML_DOM_NODE_FILTER_FILTER_ACCEPT, "GXML_DOM_NODE_FILTER_FILTER_ACCEPT", "accept"}, {GXML_DOM_NODE_FILTER_FILTER_REJECT, "GXML_DOM_NODE_FILTER_FILTER_REJECT", "reject"}, {GXML_DOM_NODE_FILTER_FILTER_SKIP, "GXML_DOM_NODE_FILTER_FILTER_SKIP", "skip"}, {0, NULL, NULL}};
	GType gxml_dom_node_filter_filter_type_id;
	gxml_dom_node_filter_filter_type_id = g_enum_register_static ("GXmlDomNodeFilterFilter", values);
	return gxml_dom_node_filter_filter_type_id;
}

GType
gxml_dom_node_filter_filter_get_type (void)
{
	static volatile gsize gxml_dom_node_filter_filter_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_node_filter_filter_type_id__once)) {
		GType gxml_dom_node_filter_filter_type_id;
		gxml_dom_node_filter_filter_type_id = gxml_dom_node_filter_filter_get_type_once ();
		g_once_init_leave (&gxml_dom_node_filter_filter_type_id__once, gxml_dom_node_filter_filter_type_id);
	}
	return gxml_dom_node_filter_filter_type_id__once;
}

GXmlDomNodeFilter*
gxml_dom_node_filter_construct (GType object_type)
{
	GXmlDomNodeFilter * self = NULL;
	self = (GXmlDomNodeFilter*) g_object_new (object_type, NULL);
	return self;
}

GXmlDomNodeFilter*
gxml_dom_node_filter_new (void)
{
	return gxml_dom_node_filter_construct (GXML_TYPE_DOM_NODE_FILTER);
}

static void
gxml_dom_node_filter_class_init (GXmlDomNodeFilterClass * klass,
                                 gpointer klass_data)
{
	gxml_dom_node_filter_parent_class = g_type_class_peek_parent (klass);
}

static void
gxml_dom_node_filter_instance_init (GXmlDomNodeFilter * self,
                                    gpointer klass)
{
}

/**
 * No implemented jet. This can lead to API changes in future versions.
 */
static GType
gxml_dom_node_filter_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GXmlDomNodeFilterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_dom_node_filter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlDomNodeFilter), 0, (GInstanceInitFunc) gxml_dom_node_filter_instance_init, NULL };
	GType gxml_dom_node_filter_type_id;
	gxml_dom_node_filter_type_id = g_type_register_static (G_TYPE_OBJECT, "GXmlDomNodeFilter", &g_define_type_info, 0);
	return gxml_dom_node_filter_type_id;
}

GType
gxml_dom_node_filter_get_type (void)
{
	static volatile gsize gxml_dom_node_filter_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_node_filter_type_id__once)) {
		GType gxml_dom_node_filter_type_id;
		gxml_dom_node_filter_type_id = gxml_dom_node_filter_get_type_once ();
		g_once_init_leave (&gxml_dom_node_filter_type_id__once, gxml_dom_node_filter_type_id);
	}
	return gxml_dom_node_filter_type_id__once;
}

GXmlDomNode*
gxml_dom_tree_walker_get_root (GXmlDomTreeWalker* self)
{
	GXmlDomTreeWalkerIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_TREE_WALKER_GET_INTERFACE (self);
	if (_iface_->get_root) {
		return _iface_->get_root (self);
	}
	return NULL;
}

gint
gxml_dom_tree_walker_get_what_to_show (GXmlDomTreeWalker* self)
{
	GXmlDomTreeWalkerIface* _iface_;
	g_return_val_if_fail (self != NULL, -1);
	_iface_ = GXML_DOM_TREE_WALKER_GET_INTERFACE (self);
	if (_iface_->get_what_to_show) {
		return _iface_->get_what_to_show (self);
	}
	return -1;
}

GXmlDomNode*
gxml_dom_tree_walker_get_current_node (GXmlDomTreeWalker* self)
{
	GXmlDomTreeWalkerIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_TREE_WALKER_GET_INTERFACE (self);
	if (_iface_->get_current_node) {
		return _iface_->get_current_node (self);
	}
	return NULL;
}

GXmlDomNode*
gxml_dom_tree_walker_parent_node (GXmlDomTreeWalker* self)
{
	GXmlDomTreeWalkerIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_TREE_WALKER_GET_INTERFACE (self);
	if (_iface_->parent_node) {
		return _iface_->parent_node (self);
	}
	return NULL;
}

GXmlDomNode*
gxml_dom_tree_walker_first_child (GXmlDomTreeWalker* self)
{
	GXmlDomTreeWalkerIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_TREE_WALKER_GET_INTERFACE (self);
	if (_iface_->first_child) {
		return _iface_->first_child (self);
	}
	return NULL;
}

GXmlDomNode*
gxml_dom_tree_walker_last_child (GXmlDomTreeWalker* self)
{
	GXmlDomTreeWalkerIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_TREE_WALKER_GET_INTERFACE (self);
	if (_iface_->last_child) {
		return _iface_->last_child (self);
	}
	return NULL;
}

GXmlDomNode*
gxml_dom_tree_walker_previous_sibling (GXmlDomTreeWalker* self)
{
	GXmlDomTreeWalkerIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_TREE_WALKER_GET_INTERFACE (self);
	if (_iface_->previous_sibling) {
		return _iface_->previous_sibling (self);
	}
	return NULL;
}

GXmlDomNode*
gxml_dom_tree_walker_next_sibling (GXmlDomTreeWalker* self)
{
	GXmlDomTreeWalkerIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_TREE_WALKER_GET_INTERFACE (self);
	if (_iface_->next_sibling) {
		return _iface_->next_sibling (self);
	}
	return NULL;
}

GXmlDomNode*
gxml_dom_tree_walker_previous_node (GXmlDomTreeWalker* self)
{
	GXmlDomTreeWalkerIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_TREE_WALKER_GET_INTERFACE (self);
	if (_iface_->previous_node) {
		return _iface_->previous_node (self);
	}
	return NULL;
}

GXmlDomNode*
gxml_dom_tree_walker_next_node (GXmlDomTreeWalker* self)
{
	GXmlDomTreeWalkerIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_TREE_WALKER_GET_INTERFACE (self);
	if (_iface_->next_node) {
		return _iface_->next_node (self);
	}
	return NULL;
}

static void
gxml_dom_tree_walker_default_init (GXmlDomTreeWalkerIface * iface,
                                   gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_object ("root", "root", "root", GXML_TYPE_DOM_NODE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_int ("what-to-show", "what-to-show", "what-to-show", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_object ("current-node", "current-node", "current-node", GXML_TYPE_DOM_NODE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	gxml_dom_tree_walker_signals[GXML_DOM_TREE_WALKER_ACCEPT_NODE_SIGNAL] = g_signal_new ("accept-node", GXML_TYPE_DOM_TREE_WALKER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_ENUM__OBJECT, GXML_DOM_NODE_FILTER_TYPE_FILTER, 1, GXML_TYPE_DOM_NODE);
}

/**
 * Document tree walker.
 *
 * If you want to filter while you go though the tree
 * set a handler for the {@link accept_node} signal
 */
static GType
gxml_dom_tree_walker_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GXmlDomTreeWalkerIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_dom_tree_walker_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gxml_dom_tree_walker_type_id;
	gxml_dom_tree_walker_type_id = g_type_register_static (G_TYPE_INTERFACE, "GXmlDomTreeWalker", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gxml_dom_tree_walker_type_id, G_TYPE_OBJECT);
	return gxml_dom_tree_walker_type_id;
}

GType
gxml_dom_tree_walker_get_type (void)
{
	static volatile gsize gxml_dom_tree_walker_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_tree_walker_type_id__once)) {
		GType gxml_dom_tree_walker_type_id;
		gxml_dom_tree_walker_type_id = gxml_dom_tree_walker_get_type_once ();
		g_once_init_leave (&gxml_dom_tree_walker_type_id__once, gxml_dom_tree_walker_type_id);
	}
	return gxml_dom_tree_walker_type_id__once;
}

gint
gxml_dom_named_node_map_get_length (GXmlDomNamedNodeMap* self)
{
	GXmlDomNamedNodeMapIface* _iface_;
	g_return_val_if_fail (self != NULL, -1);
	_iface_ = GXML_DOM_NAMED_NODE_MAP_GET_INTERFACE (self);
	if (_iface_->get_length) {
		return _iface_->get_length (self);
	}
	return -1;
}

GXmlDomNode*
gxml_dom_named_node_map_item (GXmlDomNamedNodeMap* self,
                              gint index)
{
	GXmlDomNamedNodeMapIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_NAMED_NODE_MAP_GET_INTERFACE (self);
	if (_iface_->item) {
		return _iface_->item (self, index);
	}
	return NULL;
}

GXmlDomNode*
gxml_dom_named_node_map_get_named_item (GXmlDomNamedNodeMap* self,
                                        const gchar* name)
{
	GXmlDomNamedNodeMapIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_NAMED_NODE_MAP_GET_INTERFACE (self);
	if (_iface_->get_named_item) {
		return _iface_->get_named_item (self, name);
	}
	return NULL;
}

GXmlDomNode*
gxml_dom_named_node_map_set_named_item (GXmlDomNamedNodeMap* self,
                                        GXmlDomNode* node,
                                        GError** error)
{
	GXmlDomNamedNodeMapIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_NAMED_NODE_MAP_GET_INTERFACE (self);
	if (_iface_->set_named_item) {
		return _iface_->set_named_item (self, node, error);
	}
	return NULL;
}

GXmlDomNode*
gxml_dom_named_node_map_remove_named_item (GXmlDomNamedNodeMap* self,
                                           const gchar* name,
                                           GError** error)
{
	GXmlDomNamedNodeMapIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_NAMED_NODE_MAP_GET_INTERFACE (self);
	if (_iface_->remove_named_item) {
		return _iface_->remove_named_item (self, name, error);
	}
	return NULL;
}

GXmlDomNode*
gxml_dom_named_node_map_remove_named_item_ns (GXmlDomNamedNodeMap* self,
                                              const gchar* namespace_uri,
                                              const gchar* localName,
                                              GError** error)
{
	GXmlDomNamedNodeMapIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_NAMED_NODE_MAP_GET_INTERFACE (self);
	if (_iface_->remove_named_item_ns) {
		return _iface_->remove_named_item_ns (self, namespace_uri, localName, error);
	}
	return NULL;
}

GXmlDomNode*
gxml_dom_named_node_map_get_named_item_ns (GXmlDomNamedNodeMap* self,
                                           const gchar* namespace_uri,
                                           const gchar* local_name,
                                           GError** error)
{
	GXmlDomNamedNodeMapIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_NAMED_NODE_MAP_GET_INTERFACE (self);
	if (_iface_->get_named_item_ns) {
		return _iface_->get_named_item_ns (self, namespace_uri, local_name, error);
	}
	return NULL;
}

GXmlDomNode*
gxml_dom_named_node_map_set_named_item_ns (GXmlDomNamedNodeMap* self,
                                           GXmlDomNode* node,
                                           GError** error)
{
	GXmlDomNamedNodeMapIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_NAMED_NODE_MAP_GET_INTERFACE (self);
	if (_iface_->set_named_item_ns) {
		return _iface_->set_named_item_ns (self, node, error);
	}
	return NULL;
}

static void
gxml_dom_named_node_map_default_init (GXmlDomNamedNodeMapIface * iface,
                                      gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_int ("length", "length", "length", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static GType
gxml_dom_named_node_map_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GXmlDomNamedNodeMapIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_dom_named_node_map_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gxml_dom_named_node_map_type_id;
	gxml_dom_named_node_map_type_id = g_type_register_static (G_TYPE_INTERFACE, "GXmlDomNamedNodeMap", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gxml_dom_named_node_map_type_id, G_TYPE_OBJECT);
	g_type_interface_add_prerequisite (gxml_dom_named_node_map_type_id, GEE_TYPE_MAP);
	return gxml_dom_named_node_map_type_id;
}

GType
gxml_dom_named_node_map_get_type (void)
{
	static volatile gsize gxml_dom_named_node_map_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_named_node_map_type_id__once)) {
		GType gxml_dom_named_node_map_type_id;
		gxml_dom_named_node_map_type_id = gxml_dom_named_node_map_get_type_once ();
		g_once_init_leave (&gxml_dom_named_node_map_type_id__once, gxml_dom_named_node_map_type_id);
	}
	return gxml_dom_named_node_map_type_id__once;
}

gint
gxml_dom_token_list_get_length (GXmlDomTokenList* self)
{
	GXmlDomTokenListIface* _iface_;
	g_return_val_if_fail (self != NULL, -1);
	_iface_ = GXML_DOM_TOKEN_LIST_GET_INTERFACE (self);
	if (_iface_->get_length) {
		return _iface_->get_length (self);
	}
	return -1;
}

gchar*
gxml_dom_token_list_item (GXmlDomTokenList* self,
                          gint index)
{
	GXmlDomTokenListIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_TOKEN_LIST_GET_INTERFACE (self);
	if (_iface_->item) {
		return _iface_->item (self, index);
	}
	return NULL;
}

gboolean
gxml_dom_token_list_contains (GXmlDomTokenList* self,
                              const gchar* token,
                              GError** error)
{
	GXmlDomTokenListIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = GXML_DOM_TOKEN_LIST_GET_INTERFACE (self);
	if (_iface_->contains) {
		return _iface_->contains (self, token, error);
	}
	return FALSE;
}

void
gxml_dom_token_list_add (GXmlDomTokenList* self,
                         gchar** tokens,
                         gint tokens_length1,
                         GError** error)
{
	GXmlDomTokenListIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GXML_DOM_TOKEN_LIST_GET_INTERFACE (self);
	if (_iface_->add) {
		_iface_->add (self, tokens, tokens_length1, error);
	}
}

void
gxml_dom_token_list_remove (GXmlDomTokenList* self,
                            gchar** tokens,
                            gint tokens_length1)
{
	GXmlDomTokenListIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GXML_DOM_TOKEN_LIST_GET_INTERFACE (self);
	if (_iface_->remove) {
		_iface_->remove (self, tokens, tokens_length1);
	}
}

/**
   * If auto is true, adds token if not present and removing if it is, @force value
   * is taken in account. If auto is false, then @force is considered; if true adds
   * token, if false removes it.
   */
gboolean
gxml_dom_token_list_toggle (GXmlDomTokenList* self,
                            const gchar* token,
                            gboolean force,
                            gboolean _auto_,
                            GError** error)
{
	GXmlDomTokenListIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = GXML_DOM_TOKEN_LIST_GET_INTERFACE (self);
	if (_iface_->toggle) {
		return _iface_->toggle (self, token, force, _auto_, error);
	}
	return FALSE;
}

gchar*
gxml_dom_token_list_to_string (GXmlDomTokenList* self)
{
	GXmlDomTokenListIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_TOKEN_LIST_GET_INTERFACE (self);
	if (_iface_->to_string) {
		return _iface_->to_string (self);
	}
	return NULL;
}

static void
gxml_dom_token_list_default_init (GXmlDomTokenListIface * iface,
                                  gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_int ("length", "length", "length", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static GType
gxml_dom_token_list_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GXmlDomTokenListIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_dom_token_list_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gxml_dom_token_list_type_id;
	gxml_dom_token_list_type_id = g_type_register_static (G_TYPE_INTERFACE, "GXmlDomTokenList", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gxml_dom_token_list_type_id, G_TYPE_OBJECT);
	g_type_interface_add_prerequisite (gxml_dom_token_list_type_id, GEE_TYPE_BIDIR_LIST);
	return gxml_dom_token_list_type_id;
}

GType
gxml_dom_token_list_get_type (void)
{
	static volatile gsize gxml_dom_token_list_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_token_list_type_id__once)) {
		GType gxml_dom_token_list_type_id;
		gxml_dom_token_list_type_id = gxml_dom_token_list_get_type_once ();
		g_once_init_leave (&gxml_dom_token_list_type_id__once, gxml_dom_token_list_type_id);
	}
	return gxml_dom_token_list_type_id__once;
}

gchar*
gxml_dom_settable_token_list_get_value (GXmlDomSettableTokenList* self)
{
	GXmlDomSettableTokenListIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_SETTABLE_TOKEN_LIST_GET_INTERFACE (self);
	if (_iface_->get_value) {
		return _iface_->get_value (self);
	}
	return NULL;
}

void
gxml_dom_settable_token_list_set_value (GXmlDomSettableTokenList* self,
                                        const gchar* value)
{
	GXmlDomSettableTokenListIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GXML_DOM_SETTABLE_TOKEN_LIST_GET_INTERFACE (self);
	if (_iface_->set_value) {
		_iface_->set_value (self, value);
	}
}

static void
gxml_dom_settable_token_list_default_init (GXmlDomSettableTokenListIface * iface,
                                           gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_string ("value", "value", "value", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

/**
 * No implemented jet. This can lead to API changes in future versions.
 */
static GType
gxml_dom_settable_token_list_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GXmlDomSettableTokenListIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_dom_settable_token_list_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gxml_dom_settable_token_list_type_id;
	gxml_dom_settable_token_list_type_id = g_type_register_static (G_TYPE_INTERFACE, "GXmlDomSettableTokenList", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gxml_dom_settable_token_list_type_id, G_TYPE_OBJECT);
	g_type_interface_add_prerequisite (gxml_dom_settable_token_list_type_id, GXML_TYPE_DOM_TOKEN_LIST);
	return gxml_dom_settable_token_list_type_id;
}

GType
gxml_dom_settable_token_list_get_type (void)
{
	static volatile gsize gxml_dom_settable_token_list_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_settable_token_list_type_id__once)) {
		GType gxml_dom_settable_token_list_type_id;
		gxml_dom_settable_token_list_type_id = gxml_dom_settable_token_list_get_type_once ();
		g_once_init_leave (&gxml_dom_settable_token_list_type_id__once, gxml_dom_settable_token_list_type_id);
	}
	return gxml_dom_settable_token_list_type_id__once;
}

