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

/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 0; tab-width: 2 -*- */
/* GXmlListChildren.vala
 *
 * Copyright (C) 2015  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 <glib.h>
#include <glib-object.h>
#include <gee.h>
#include <libxml/tree.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>


#define GXML_TYPE_GLIST_CHILDREN (gxml_glist_children_get_type ())
#define GXML_GLIST_CHILDREN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GLIST_CHILDREN, GXmlGListChildren))
#define GXML_GLIST_CHILDREN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GLIST_CHILDREN, GXmlGListChildrenClass))
#define GXML_IS_GLIST_CHILDREN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GLIST_CHILDREN))
#define GXML_IS_GLIST_CHILDREN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GLIST_CHILDREN))
#define GXML_GLIST_CHILDREN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GLIST_CHILDREN, GXmlGListChildrenClass))

typedef struct _GXmlGListChildren GXmlGListChildren;
typedef struct _GXmlGListChildrenClass GXmlGListChildrenClass;
typedef struct _GXmlGListChildrenPrivate GXmlGListChildrenPrivate;

#define GXML_TYPE_GNODE (gxml_gnode_get_type ())
#define GXML_GNODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GNODE, GXmlGNode))
#define GXML_GNODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GNODE, GXmlGNodeClass))
#define GXML_IS_GNODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GNODE))
#define GXML_IS_GNODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GNODE))
#define GXML_GNODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GNODE, GXmlGNodeClass))

typedef struct _GXmlGNode GXmlGNode;
typedef struct _GXmlGNodeClass GXmlGNodeClass;

#define GXML_TYPE_GDOCUMENT (gxml_gdocument_get_type ())
#define GXML_GDOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GDOCUMENT, GXmlGDocument))
#define GXML_GDOCUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GDOCUMENT, GXmlGDocumentClass))
#define GXML_IS_GDOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GDOCUMENT))
#define GXML_IS_GDOCUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GDOCUMENT))
#define GXML_GDOCUMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GDOCUMENT, GXmlGDocumentClass))

typedef struct _GXmlGDocument GXmlGDocument;
typedef struct _GXmlGDocumentClass GXmlGDocumentClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define GXML_TYPE_NODE (gxml_node_get_type ())
#define GXML_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_NODE, GXmlNode))
#define GXML_IS_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_NODE))
#define GXML_NODE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_NODE, GXmlNodeIface))

typedef struct _GXmlNode GXmlNode;
typedef struct _GXmlNodeIface GXmlNodeIface;

#define GXML_TYPE_ELEMENT_LIST (gxml_element_list_get_type ())
#define GXML_ELEMENT_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_ELEMENT_LIST, GXmlElementList))
#define GXML_ELEMENT_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_ELEMENT_LIST, GXmlElementListClass))
#define GXML_IS_ELEMENT_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_ELEMENT_LIST))
#define GXML_IS_ELEMENT_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_ELEMENT_LIST))
#define GXML_ELEMENT_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_ELEMENT_LIST, GXmlElementListClass))

typedef struct _GXmlElementList GXmlElementList;
typedef struct _GXmlElementListClass GXmlElementListClass;

#define GXML_TYPE_NAMESPACE (gxml_namespace_get_type ())
#define GXML_NAMESPACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_NAMESPACE, GXmlNamespace))
#define GXML_IS_NAMESPACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_NAMESPACE))
#define GXML_NAMESPACE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_NAMESPACE, GXmlNamespaceIface))

typedef struct _GXmlNamespace GXmlNamespace;
typedef struct _GXmlNamespaceIface GXmlNamespaceIface;

#define GXML_TYPE_NODE_TYPE (gxml_node_type_get_type ())

#define GXML_TYPE_DOCUMENT (gxml_document_get_type ())
#define GXML_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOCUMENT, GXmlDocument))
#define GXML_IS_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOCUMENT))
#define GXML_DOCUMENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOCUMENT, GXmlDocumentIface))

typedef struct _GXmlDocument GXmlDocument;
typedef struct _GXmlDocumentIface GXmlDocumentIface;

#define GXML_GLIST_CHILDREN_TYPE_ITERATOR (gxml_glist_children_iterator_get_type ())
#define GXML_GLIST_CHILDREN_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_GLIST_CHILDREN_TYPE_ITERATOR, GXmlGListChildrenIterator))
#define GXML_GLIST_CHILDREN_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_GLIST_CHILDREN_TYPE_ITERATOR, GXmlGListChildrenIteratorClass))
#define GXML_GLIST_CHILDREN_IS_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_GLIST_CHILDREN_TYPE_ITERATOR))
#define GXML_GLIST_CHILDREN_IS_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_GLIST_CHILDREN_TYPE_ITERATOR))
#define GXML_GLIST_CHILDREN_ITERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_GLIST_CHILDREN_TYPE_ITERATOR, GXmlGListChildrenIteratorClass))

typedef struct _GXmlGListChildrenIterator GXmlGListChildrenIterator;
typedef struct _GXmlGListChildrenIteratorClass GXmlGListChildrenIteratorClass;

#define GXML_TYPE_GNAMESPACE (gxml_gnamespace_get_type ())
#define GXML_GNAMESPACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GNAMESPACE, GXmlGNamespace))
#define GXML_GNAMESPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GNAMESPACE, GXmlGNamespaceClass))
#define GXML_IS_GNAMESPACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GNAMESPACE))
#define GXML_IS_GNAMESPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GNAMESPACE))
#define GXML_GNAMESPACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GNAMESPACE, GXmlGNamespaceClass))

typedef struct _GXmlGNamespace GXmlGNamespace;
typedef struct _GXmlGNamespaceClass GXmlGNamespaceClass;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _GXmlGListChildrenIteratorPrivate GXmlGListChildrenIteratorPrivate;

struct _GXmlGListChildren {
	GeeAbstractBidirList parent_instance;
	GXmlGListChildrenPrivate * priv;
};

struct _GXmlGListChildrenClass {
	GeeAbstractBidirListClass parent_class;
};

struct _GXmlGListChildrenPrivate {
	GXmlGDocument* _doc;
	xmlNode* _node;
	gboolean _read_only;
};

struct _GXmlNamespaceIface {
	GTypeInterface parent_iface;
	gchar* (*get_uri) (GXmlNamespace* self);
	gchar* (*get_prefix) (GXmlNamespace* self);
};

typedef enum  {
	GXML_NODE_TYPE_X_UNKNOWN = 0,
	GXML_NODE_TYPE_ELEMENT = 1,
	GXML_NODE_TYPE_ATTRIBUTE,
	GXML_NODE_TYPE_TEXT,
	GXML_NODE_TYPE_CDATA_SECTION,
	GXML_NODE_TYPE_ENTITY_REFERENCE,
	GXML_NODE_TYPE_ENTITY,
	GXML_NODE_TYPE_PROCESSING_INSTRUCTION,
	GXML_NODE_TYPE_COMMENT,
	GXML_NODE_TYPE_DOCUMENT,
	GXML_NODE_TYPE_DOCUMENT_TYPE,
	GXML_NODE_TYPE_DOCUMENT_FRAGMENT,
	GXML_NODE_TYPE_NOTATION
} GXmlNodeType;

struct _GXmlDocumentIface {
	GTypeInterface parent_iface;
	GXmlNode* (*create_element) (GXmlDocument* self, const gchar* name, GError** error);
	GXmlNode* (*create_text) (GXmlDocument* self, const gchar* text);
	GXmlNode* (*create_comment) (GXmlDocument* self, const gchar* text);
	GXmlNode* (*create_cdata) (GXmlDocument* self, const gchar* text);
	GXmlNode* (*create_pi) (GXmlDocument* self, const gchar* target, const gchar* data);
	gboolean (*save) (GXmlDocument* self, GCancellable* cancellable, GError** error);
	gboolean (*save_as) (GXmlDocument* self, GFile* f, GCancellable* cancellable, GError** error);
	gboolean (*get_indent) (GXmlDocument* self);
	void (*set_indent) (GXmlDocument* self, gboolean value);
	gboolean (*get_ns_top) (GXmlDocument* self);
	void (*set_ns_top) (GXmlDocument* self, gboolean value);
	gboolean (*get_prefix_default_ns) (GXmlDocument* self);
	void (*set_prefix_default_ns) (GXmlDocument* self, gboolean value);
	gboolean (*get_backup) (GXmlDocument* self);
	void (*set_backup) (GXmlDocument* self, gboolean value);
	GXmlNode* (*get_root) (GXmlDocument* self);
	GFile* (*get_file) (GXmlDocument* self);
	void (*set_file) (GXmlDocument* self, GFile* value);
};

struct _GXmlNodeIface {
	GTypeInterface parent_iface;
	GXmlNode* (*get) (GXmlNode* self, const gchar* key);
	GXmlElementList* (*get_elements_by_property_value) (GXmlNode* self, const gchar* property, const gchar* value);
	gchar* (*to_string) (GXmlNode* self);
	gboolean (*set_namespace) (GXmlNode* self, const gchar* uri, const gchar* prefix);
	gchar* (*ns_prefix) (GXmlNode* self);
	gchar* (*ns_uri) (GXmlNode* self);
	GeeList* (*get_namespaces) (GXmlNode* self);
	GeeBidirList* (*get_childs) (GXmlNode* self);
	GeeBidirList* (*get_children) (GXmlNode* self);
	GeeMap* (*get_attrs) (GXmlNode* self);
	gchar* (*get_name) (GXmlNode* self);
	gchar* (*get_value) (GXmlNode* self);
	void (*set_value) (GXmlNode* self, const gchar* value);
	GXmlNodeType (*get_type_node) (GXmlNode* self);
	GXmlDocument* (*get_document) (GXmlNode* self);
	GXmlNode* (*get_parent) (GXmlNode* self);
};

struct _GXmlGListChildrenIterator {
	GObject parent_instance;
	GXmlGListChildrenIteratorPrivate * priv;
};

struct _GXmlGListChildrenIteratorClass {
	GObjectClass parent_class;
};

struct _GXmlGListChildrenIteratorPrivate {
	GXmlGDocument* _doc;
	xmlNode* _node;
	xmlNode* _current;
	gint i;
};


static gpointer gxml_glist_children_parent_class = NULL;
static gpointer gxml_glist_children_iterator_parent_class = NULL;
static GeeTraversableIface* gxml_glist_children_iterator_gee_traversable_parent_iface = NULL;
static GeeIteratorIface* gxml_glist_children_iterator_gee_iterator_parent_iface = NULL;
static GeeBidirIteratorIface* gxml_glist_children_iterator_gee_bidir_iterator_parent_iface = NULL;
static GeeListIteratorIface* gxml_glist_children_iterator_gee_list_iterator_parent_iface = NULL;
static GeeBidirListIteratorIface* gxml_glist_children_iterator_gee_bidir_list_iterator_parent_iface = NULL;

GType gxml_glist_children_get_type (void) G_GNUC_CONST;
GType gxml_gnode_get_type (void) G_GNUC_CONST;
GType gxml_gdocument_get_type (void) G_GNUC_CONST;
#define GXML_GLIST_CHILDREN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GXML_TYPE_GLIST_CHILDREN, GXmlGListChildrenPrivate))
enum  {
	GXML_GLIST_CHILDREN_DUMMY_PROPERTY,
	GXML_GLIST_CHILDREN_SIZE,
	GXML_GLIST_CHILDREN_READ_ONLY
};
GXmlGListChildren* gxml_glist_children_new (GXmlGDocument* doc, xmlNode* node);
GXmlGListChildren* gxml_glist_children_construct (GType object_type, GXmlGDocument* doc, xmlNode* node);
GType gxml_element_list_get_type (void) G_GNUC_CONST;
GType gxml_namespace_get_type (void) G_GNUC_CONST;
GType gxml_node_type_get_type (void) G_GNUC_CONST;
GType gxml_document_get_type (void) G_GNUC_CONST;
GType gxml_node_get_type (void) G_GNUC_CONST;
static GeeBidirListIterator* gxml_glist_children_real_bidir_list_iterator (GeeAbstractBidirList* base);
GXmlGListChildrenIterator* gxml_glist_children_iterator_new (GXmlGDocument* doc, xmlNode* node);
GXmlGListChildrenIterator* gxml_glist_children_iterator_construct (GType object_type, GXmlGDocument* doc, xmlNode* node);
GType gxml_glist_children_iterator_get_type (void) G_GNUC_CONST;
static GXmlNode* gxml_glist_children_real_get (GeeAbstractList* base, gint index);
GXmlNode* gxml_gnode_to_gnode (GXmlGDocument* doc, xmlNode* node);
static gint gxml_glist_children_real_index_of (GeeAbstractList* base, GXmlNode* item);
xmlNode* gxml_gnode_get_internal_node (GXmlGNode* self);
static void gxml_glist_children_real_insert (GeeAbstractList* base, gint index, GXmlNode* item);
static GeeListIterator* gxml_glist_children_real_list_iterator (GeeAbstractList* base);
static GXmlNode* gxml_glist_children_real_remove_at (GeeAbstractList* base, gint index);
static void gxml_glist_children_real_set (GeeAbstractList* base, gint index, GXmlNode* item);
static GeeList* gxml_glist_children_real_slice (GeeAbstractList* base, gint start, gint stop);
static gboolean gxml_glist_children_real_add (GeeAbstractCollection* base, GXmlNode* item);
GType gxml_gnamespace_get_type (void) G_GNUC_CONST;
gchar* gxml_namespace_get_uri (GXmlNamespace* self);
gchar* gxml_namespace_get_prefix (GXmlNamespace* self);
static void gxml_glist_children_real_clear (GeeAbstractCollection* base);
static gboolean gxml_glist_children_real_contains (GeeAbstractCollection* base, GXmlNode* item);
static GeeIterator* gxml_glist_children_real_iterator (GeeAbstractCollection* base);
static gboolean gxml_glist_children_real_remove (GeeAbstractCollection* base, GXmlNode* item);
#define GXML_GLIST_CHILDREN_ITERATOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GXML_GLIST_CHILDREN_TYPE_ITERATOR, GXmlGListChildrenIteratorPrivate))
enum  {
	GXML_GLIST_CHILDREN_ITERATOR_DUMMY_PROPERTY,
	GXML_GLIST_CHILDREN_ITERATOR_READ_ONLY,
	GXML_GLIST_CHILDREN_ITERATOR_VALID
};
static void gxml_glist_children_iterator_real_insert (GeeBidirListIterator* base, GXmlNode* item);
static void gxml_glist_children_iterator_real_add (GeeListIterator* base, GXmlNode* item);
static gint gxml_glist_children_iterator_real_index (GeeListIterator* base);
static void gxml_glist_children_iterator_real_set (GeeListIterator* base, GXmlNode* item);
static GXmlNode* gxml_glist_children_iterator_real_get (GeeIterator* base);
static gboolean gxml_glist_children_iterator_real_has_next (GeeIterator* base);
static gboolean gxml_glist_children_iterator_real_next (GeeIterator* base);
static void gxml_glist_children_iterator_real_remove (GeeIterator* base);
static gboolean gxml_glist_children_iterator_real_foreach (GeeTraversable* base, GeeForallFunc f, void* f_target);
static gboolean gxml_glist_children_iterator_real_first (GeeBidirIterator* base);
static gboolean gxml_glist_children_iterator_real_has_previous (GeeBidirIterator* base);
static gboolean gxml_glist_children_iterator_real_last (GeeBidirIterator* base);
static gboolean gxml_glist_children_iterator_real_previous (GeeBidirIterator* base);
static void gxml_glist_children_iterator_finalize (GObject* obj);
static void _vala_gxml_glist_children_iterator_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void gxml_glist_children_finalize (GObject* obj);
static void _vala_gxml_glist_children_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


GXmlGListChildren* gxml_glist_children_construct (GType object_type, GXmlGDocument* doc, xmlNode* node) {
	GXmlGListChildren * self = NULL;
	xmlNode* _tmp0_ = NULL;
	GXmlGDocument* _tmp1_ = NULL;
	GXmlGDocument* _tmp2_ = NULL;
	g_return_val_if_fail (doc != NULL, NULL);
	self = (GXmlGListChildren*) gee_abstract_bidir_list_construct (object_type, GXML_TYPE_NODE, (GBoxedCopyFunc) g_object_ref, g_object_unref);
	_tmp0_ = node;
	self->priv->_node = _tmp0_;
	_tmp1_ = doc;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (self->priv->_doc);
	self->priv->_doc = _tmp2_;
	return self;
}


GXmlGListChildren* gxml_glist_children_new (GXmlGDocument* doc, xmlNode* node) {
	return gxml_glist_children_construct (GXML_TYPE_GLIST_CHILDREN, doc, node);
}


static GeeBidirListIterator* gxml_glist_children_real_bidir_list_iterator (GeeAbstractBidirList* base) {
	GXmlGListChildren * self;
	GeeBidirListIterator* result = NULL;
	GXmlGDocument* _tmp0_ = NULL;
	xmlNode* _tmp1_ = NULL;
	GXmlGListChildrenIterator* _tmp2_ = NULL;
	self = (GXmlGListChildren*) base;
	_tmp0_ = self->priv->_doc;
	_tmp1_ = self->priv->_node;
	_tmp2_ = gxml_glist_children_iterator_new (_tmp0_, _tmp1_);
	result = (GeeBidirListIterator*) _tmp2_;
	return result;
}


static GXmlNode* gxml_glist_children_real_get (GeeAbstractList* base, gint index) {
	GXmlGListChildren * self;
	GXmlNode* result = NULL;
	xmlNode* _tmp0_ = NULL;
	xmlNode* n = NULL;
	xmlNode* _tmp1_ = NULL;
	xmlNode* _tmp2_ = NULL;
	gint i = 0;
	self = (GXmlGListChildren*) base;
	_tmp0_ = self->priv->_node;
	if (_tmp0_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp1_ = self->priv->_node;
	_tmp2_ = _tmp1_->children;
	n = _tmp2_;
	i = 0;
	while (TRUE) {
		xmlNode* _tmp3_ = NULL;
		GXmlNodeType t = 0;
		xmlNode* _tmp4_ = NULL;
		xmlElementType _tmp5_ = 0;
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
		gint _tmp11_ = 0;
		xmlNode* _tmp12_ = NULL;
		xmlNode* _tmp13_ = NULL;
		_tmp3_ = n;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp4_ = n;
		_tmp5_ = _tmp4_->type;
		t = (GXmlNodeType) _tmp5_;
		_tmp6_ = i;
		_tmp7_ = index;
		if (_tmp6_ == _tmp7_) {
			GXmlGDocument* _tmp8_ = NULL;
			xmlNode* _tmp9_ = NULL;
			GXmlNode* _tmp10_ = NULL;
			_tmp8_ = self->priv->_doc;
			_tmp9_ = n;
			_tmp10_ = gxml_gnode_to_gnode (_tmp8_, _tmp9_);
			result = _tmp10_;
			return result;
		}
		_tmp11_ = i;
		i = _tmp11_ + 1;
		_tmp12_ = n;
		_tmp13_ = _tmp12_->next;
		n = _tmp13_;
	}
	result = NULL;
	return result;
}


static gint gxml_glist_children_real_index_of (GeeAbstractList* base, GXmlNode* item) {
	GXmlGListChildren * self;
	gint result = 0;
	xmlNode* _tmp0_ = NULL;
	GXmlNode* _tmp1_ = NULL;
	xmlNode* n = NULL;
	xmlNode* _tmp2_ = NULL;
	xmlNode* _tmp3_ = NULL;
	gint i = 0;
	self = (GXmlGListChildren*) base;
	g_return_val_if_fail (item != NULL, 0);
	_tmp0_ = self->priv->_node;
	if (_tmp0_ == NULL) {
		result = -1;
		return result;
	}
	_tmp1_ = item;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, GXML_TYPE_GNODE)) {
		result = -1;
		return result;
	}
	_tmp2_ = self->priv->_node;
	_tmp3_ = _tmp2_->children;
	n = _tmp3_;
	i = 0;
	while (TRUE) {
		xmlNode* _tmp4_ = NULL;
		xmlNode* _tmp5_ = NULL;
		GXmlNode* _tmp6_ = NULL;
		xmlNode* _tmp7_ = NULL;
		xmlNode* _tmp8_ = NULL;
		xmlNode* _tmp9_ = NULL;
		gint _tmp10_ = 0;
		_tmp4_ = n;
		if (!(_tmp4_ != NULL)) {
			break;
		}
		_tmp5_ = n;
		_tmp6_ = item;
		_tmp7_ = gxml_gnode_get_internal_node (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GXML_TYPE_GNODE, GXmlGNode));
		if (_tmp5_ == _tmp7_) {
			result = i;
			return result;
		}
		_tmp8_ = n;
		_tmp9_ = _tmp8_->next;
		n = _tmp9_;
		_tmp10_ = i;
		i = _tmp10_ + 1;
	}
	result = -1;
	return result;
}


/**
   * This method is ignored by default.
   */
static void gxml_glist_children_real_insert (GeeAbstractList* base, gint index, GXmlNode* item) {
	GXmlGListChildren * self;
	self = (GXmlGListChildren*) base;
	g_return_if_fail (item != NULL);
}


static GeeListIterator* gxml_glist_children_real_list_iterator (GeeAbstractList* base) {
	GXmlGListChildren * self;
	GeeListIterator* result = NULL;
	GXmlGDocument* _tmp0_ = NULL;
	xmlNode* _tmp1_ = NULL;
	GXmlGListChildrenIterator* _tmp2_ = NULL;
	self = (GXmlGListChildren*) base;
	_tmp0_ = self->priv->_doc;
	_tmp1_ = self->priv->_node;
	_tmp2_ = gxml_glist_children_iterator_new (_tmp0_, _tmp1_);
	result = (GeeListIterator*) _tmp2_;
	return result;
}


/**
   * This method is ignored by default.
   */
static GXmlNode* gxml_glist_children_real_remove_at (GeeAbstractList* base, gint index) {
	GXmlGListChildren * self;
	GXmlNode* result = NULL;
	self = (GXmlGListChildren*) base;
	result = NULL;
	return result;
}


/**
   * This method is ignored by default.
   */
static void gxml_glist_children_real_set (GeeAbstractList* base, gint index, GXmlNode* item) {
	GXmlGListChildren * self;
	self = (GXmlGListChildren*) base;
	g_return_if_fail (item != NULL);
}


static GeeList* gxml_glist_children_real_slice (GeeAbstractList* base, gint start, gint stop) {
	GXmlGListChildren * self;
	GeeList* result = NULL;
	GeeArrayList* l = NULL;
	GeeArrayList* _tmp0_ = NULL;
	xmlNode* _tmp1_ = NULL;
	xmlNode* n = NULL;
	xmlNode* _tmp2_ = NULL;
	xmlNode* _tmp3_ = NULL;
	gint i = 0;
	self = (GXmlGListChildren*) base;
	_tmp0_ = gee_array_list_new (GXML_TYPE_NODE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
	l = _tmp0_;
	_tmp1_ = self->priv->_node;
	if (_tmp1_ == NULL) {
		result = (GeeList*) l;
		return result;
	}
	_tmp2_ = self->priv->_node;
	_tmp3_ = _tmp2_->children;
	n = _tmp3_;
	i = 0;
	while (TRUE) {
		xmlNode* _tmp4_ = NULL;
		gboolean _tmp5_ = FALSE;
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
		xmlNode* _tmp15_ = NULL;
		xmlNode* _tmp16_ = NULL;
		gint _tmp17_ = 0;
		_tmp4_ = n;
		if (!(_tmp4_ != NULL)) {
			break;
		}
		_tmp6_ = i;
		_tmp7_ = start;
		if (_tmp6_ >= _tmp7_) {
			gint _tmp8_ = 0;
			gint _tmp9_ = 0;
			_tmp8_ = i;
			_tmp9_ = stop;
			_tmp5_ = _tmp8_ <= _tmp9_;
		} else {
			_tmp5_ = FALSE;
		}
		if (_tmp5_) {
			GeeArrayList* _tmp10_ = NULL;
			GXmlGDocument* _tmp11_ = NULL;
			xmlNode* _tmp12_ = NULL;
			GXmlNode* _tmp13_ = NULL;
			GXmlNode* _tmp14_ = NULL;
			_tmp10_ = l;
			_tmp11_ = self->priv->_doc;
			_tmp12_ = n;
			_tmp13_ = gxml_gnode_to_gnode (_tmp11_, _tmp12_);
			_tmp14_ = _tmp13_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp10_, _tmp14_);
			_g_object_unref0 (_tmp14_);
		}
		_tmp15_ = n;
		_tmp16_ = _tmp15_->next;
		n = _tmp16_;
		_tmp17_ = i;
		i = _tmp17_ + 1;
	}
	result = (GeeList*) l;
	return result;
}


static gboolean gxml_glist_children_real_add (GeeAbstractCollection* base, GXmlNode* item) {
	GXmlGListChildren * self;
	gboolean result = FALSE;
	xmlNode* _tmp0_ = NULL;
	GXmlNode* _tmp1_ = NULL;
	self = (GXmlGListChildren*) base;
	g_return_val_if_fail (item != NULL, FALSE);
	_tmp0_ = self->priv->_node;
	if (_tmp0_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp1_ = item;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, GXML_TYPE_GNAMESPACE)) {
		xmlNode* _tmp2_ = NULL;
		GXmlNode* _tmp3_ = NULL;
		xmlNode* _tmp4_ = NULL;
		xmlNode* _tmp5_ = NULL;
		_tmp2_ = self->priv->_node;
		_tmp3_ = item;
		_tmp4_ = gxml_gnode_get_internal_node (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GXML_TYPE_GNODE, GXmlGNode));
		_tmp5_ = xmlAddChild (_tmp2_, _tmp4_);
		result = _tmp5_ != NULL;
		return result;
	} else {
		GXmlNamespace* ns = NULL;
		GXmlNode* _tmp6_ = NULL;
		GXmlNamespace* _tmp7_ = NULL;
		xmlNode* _tmp8_ = NULL;
		GXmlNamespace* _tmp9_ = NULL;
		gchar* _tmp10_ = NULL;
		gchar* _tmp11_ = NULL;
		gchar* _tmp12_ = NULL;
		GXmlNamespace* _tmp13_ = NULL;
		gchar* _tmp14_ = NULL;
		gchar* _tmp15_ = NULL;
		gchar* _tmp16_ = NULL;
		xmlNs* _tmp17_ = NULL;
		gboolean _tmp18_ = FALSE;
		_tmp6_ = item;
		_tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GXML_TYPE_NAMESPACE, GXmlNamespace));
		ns = _tmp7_;
		_tmp8_ = self->priv->_node;
		_tmp9_ = ns;
		_tmp10_ = gxml_namespace_get_uri (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = _tmp11_;
		_tmp13_ = ns;
		_tmp14_ = gxml_namespace_get_prefix (_tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = _tmp15_;
		_tmp17_ = xmlNewNs (_tmp8_, (xmlChar*) _tmp12_, (xmlChar*) _tmp16_);
		_tmp18_ = _tmp17_ != NULL;
		_g_free0 (_tmp16_);
		_g_free0 (_tmp12_);
		result = _tmp18_;
		_g_object_unref0 (ns);
		return result;
	}
	result = FALSE;
	return result;
}


static void gxml_glist_children_real_clear (GeeAbstractCollection* base) {
	GXmlGListChildren * self;
	xmlNode* _tmp0_ = NULL;
	xmlNode* _tmp1_ = NULL;
	xmlNode* _tmp2_ = NULL;
	self = (GXmlGListChildren*) base;
	_tmp0_ = self->priv->_node;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->_node;
	_tmp2_ = _tmp1_->children;
	xmlFreeNodeList (_tmp2_);
}


static gboolean gxml_glist_children_real_contains (GeeAbstractCollection* base, GXmlNode* item) {
	GXmlGListChildren * self;
	gboolean result = FALSE;
	xmlNode* _tmp0_ = NULL;
	GXmlNode* _tmp1_ = NULL;
	xmlNode* n = NULL;
	xmlNode* _tmp2_ = NULL;
	xmlNode* _tmp3_ = NULL;
	self = (GXmlGListChildren*) base;
	g_return_val_if_fail (item != NULL, FALSE);
	_tmp0_ = self->priv->_node;
	if (_tmp0_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp1_ = item;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, GXML_TYPE_GNODE)) {
		result = FALSE;
		return result;
	}
	_tmp2_ = self->priv->_node;
	_tmp3_ = _tmp2_->children;
	n = _tmp3_;
	while (TRUE) {
		xmlNode* _tmp4_ = NULL;
		xmlNode* _tmp5_ = NULL;
		GXmlNode* _tmp6_ = NULL;
		xmlNode* _tmp7_ = NULL;
		xmlNode* _tmp8_ = NULL;
		xmlNode* _tmp9_ = NULL;
		_tmp4_ = n;
		if (!(_tmp4_ != NULL)) {
			break;
		}
		_tmp5_ = n;
		_tmp6_ = item;
		_tmp7_ = gxml_gnode_get_internal_node (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GXML_TYPE_GNODE, GXmlGNode));
		if (_tmp5_ == _tmp7_) {
			result = TRUE;
			return result;
		}
		_tmp8_ = n;
		_tmp9_ = _tmp8_->next;
		n = _tmp9_;
	}
	result = FALSE;
	return result;
}


static GeeIterator* gxml_glist_children_real_iterator (GeeAbstractCollection* base) {
	GXmlGListChildren * self;
	GeeIterator* result = NULL;
	GXmlGDocument* _tmp0_ = NULL;
	xmlNode* _tmp1_ = NULL;
	GXmlGListChildrenIterator* _tmp2_ = NULL;
	self = (GXmlGListChildren*) base;
	_tmp0_ = self->priv->_doc;
	_tmp1_ = self->priv->_node;
	_tmp2_ = gxml_glist_children_iterator_new (_tmp0_, _tmp1_);
	result = (GeeIterator*) _tmp2_;
	return result;
}


static gboolean gxml_glist_children_real_remove (GeeAbstractCollection* base, GXmlNode* item) {
	GXmlGListChildren * self;
	gboolean result = FALSE;
	xmlNode* _tmp0_ = NULL;
	GXmlNode* _tmp1_ = NULL;
	xmlNode* n = NULL;
	xmlNode* _tmp2_ = NULL;
	xmlNode* _tmp3_ = NULL;
	self = (GXmlGListChildren*) base;
	g_return_val_if_fail (item != NULL, FALSE);
	_tmp0_ = self->priv->_node;
	if (_tmp0_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp1_ = item;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, GXML_TYPE_GNODE)) {
		result = FALSE;
		return result;
	}
	_tmp2_ = self->priv->_node;
	_tmp3_ = _tmp2_->children;
	n = _tmp3_;
	while (TRUE) {
		xmlNode* _tmp4_ = NULL;
		xmlNode* _tmp5_ = NULL;
		GXmlNode* _tmp6_ = NULL;
		xmlNode* _tmp7_ = NULL;
		xmlNode* _tmp10_ = NULL;
		xmlNode* _tmp11_ = NULL;
		_tmp4_ = n;
		if (!(_tmp4_ != NULL)) {
			break;
		}
		_tmp5_ = n;
		_tmp6_ = item;
		_tmp7_ = gxml_gnode_get_internal_node (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GXML_TYPE_GNODE, GXmlGNode));
		if (_tmp5_ == _tmp7_) {
			xmlNode* _tmp8_ = NULL;
			xmlNode* _tmp9_ = NULL;
			_tmp8_ = n;
			xmlUnlinkNode (_tmp8_);
			_tmp9_ = n;
			xmlFreeNode (_tmp9_);
			result = TRUE;
			return result;
		}
		_tmp10_ = n;
		_tmp11_ = _tmp10_->next;
		n = _tmp11_;
	}
	result = FALSE;
	return result;
}


static gint gxml_glist_children_real_get_size (GeeAbstractCollection* base) {
	gint result;
	GXmlGListChildren* self;
	xmlNode* _tmp0_ = NULL;
	gint i = 0;
	xmlNode* n = NULL;
	xmlNode* _tmp1_ = NULL;
	xmlNode* _tmp2_ = NULL;
	gint _tmp7_ = 0;
	self = (GXmlGListChildren*) base;
	_tmp0_ = self->priv->_node;
	if (_tmp0_ == NULL) {
		result = -1;
		return result;
	}
	i = 0;
	_tmp1_ = self->priv->_node;
	_tmp2_ = _tmp1_->children;
	n = _tmp2_;
	while (TRUE) {
		xmlNode* _tmp3_ = NULL;
		gint _tmp4_ = 0;
		xmlNode* _tmp5_ = NULL;
		xmlNode* _tmp6_ = NULL;
		_tmp3_ = n;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp4_ = i;
		i = _tmp4_ + 1;
		_tmp5_ = n;
		_tmp6_ = _tmp5_->next;
		n = _tmp6_;
	}
	_tmp7_ = i;
	result = _tmp7_;
	return result;
}


static gboolean gxml_glist_children_real_get_read_only (GeeAbstractCollection* base) {
	gboolean result;
	GXmlGListChildren* self;
	self = (GXmlGListChildren*) base;
	result = FALSE;
	return result;
}


GXmlGListChildrenIterator* gxml_glist_children_iterator_construct (GType object_type, GXmlGDocument* doc, xmlNode* node) {
	GXmlGListChildrenIterator * self = NULL;
	xmlNode* _tmp0_ = NULL;
	xmlNode* _tmp1_ = NULL;
	xmlNode* _tmp2_ = NULL;
	GXmlGDocument* _tmp3_ = NULL;
	GXmlGDocument* _tmp4_ = NULL;
	g_return_val_if_fail (doc != NULL, NULL);
	self = (GXmlGListChildrenIterator*) g_object_new (object_type, NULL);
	_tmp0_ = node;
	self->priv->_node = _tmp0_;
	_tmp1_ = self->priv->_node;
	_tmp2_ = _tmp1_->children;
	self->priv->_current = _tmp2_;
	_tmp3_ = doc;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (self->priv->_doc);
	self->priv->_doc = _tmp4_;
	return self;
}


GXmlGListChildrenIterator* gxml_glist_children_iterator_new (GXmlGDocument* doc, xmlNode* node) {
	return gxml_glist_children_iterator_construct (GXML_GLIST_CHILDREN_TYPE_ITERATOR, doc, node);
}


/**
     * This method is ignored by default.
     */
static void gxml_glist_children_iterator_real_insert (GeeBidirListIterator* base, GXmlNode* item) {
	GXmlGListChildrenIterator * self;
	self = (GXmlGListChildrenIterator*) base;
	g_return_if_fail (item != NULL);
}


/**
     * This method is ignored by default.
     */
static void gxml_glist_children_iterator_real_add (GeeListIterator* base, GXmlNode* item) {
	GXmlGListChildrenIterator * self;
	self = (GXmlGListChildrenIterator*) base;
	g_return_if_fail (item != NULL);
}


static gint gxml_glist_children_iterator_real_index (GeeListIterator* base) {
	GXmlGListChildrenIterator * self;
	gint result = 0;
	gint _tmp0_ = 0;
	self = (GXmlGListChildrenIterator*) base;
	_tmp0_ = self->priv->i;
	result = _tmp0_;
	return result;
}


/**
     * This method is ignored by default.
     */
static void gxml_glist_children_iterator_real_set (GeeListIterator* base, GXmlNode* item) {
	GXmlGListChildrenIterator * self;
	self = (GXmlGListChildrenIterator*) base;
	g_return_if_fail (item != NULL);
}


static GXmlNode* gxml_glist_children_iterator_real_get (GeeIterator* base) {
	GXmlGListChildrenIterator * self;
	GXmlNode* result = NULL;
	GXmlGDocument* _tmp0_ = NULL;
	xmlNode* _tmp1_ = NULL;
	GXmlNode* _tmp2_ = NULL;
	self = (GXmlGListChildrenIterator*) base;
	_tmp0_ = self->priv->_doc;
	_tmp1_ = self->priv->_node;
	_tmp2_ = gxml_gnode_to_gnode (_tmp0_, _tmp1_);
	result = _tmp2_;
	return result;
}


static gboolean gxml_glist_children_iterator_real_has_next (GeeIterator* base) {
	GXmlGListChildrenIterator * self;
	gboolean result = FALSE;
	xmlNode* _tmp0_ = NULL;
	xmlNode* _tmp1_ = NULL;
	xmlNode* _tmp2_ = NULL;
	xmlNode* _tmp3_ = NULL;
	xmlNode* _tmp6_ = NULL;
	xmlNode* _tmp7_ = NULL;
	xmlNode* _tmp8_ = NULL;
	self = (GXmlGListChildrenIterator*) base;
	_tmp0_ = self->priv->_node;
	if (_tmp0_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp1_ = self->priv->_node;
	_tmp2_ = _tmp1_->children;
	if (_tmp2_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp3_ = self->priv->_current;
	if (_tmp3_ != NULL) {
		xmlNode* _tmp4_ = NULL;
		xmlNode* _tmp5_ = NULL;
		_tmp4_ = self->priv->_current;
		_tmp5_ = _tmp4_->next;
		if (_tmp5_ != NULL) {
			result = TRUE;
			return result;
		}
	}
	_tmp6_ = self->priv->_node;
	_tmp7_ = _tmp6_->children;
	_tmp8_ = _tmp7_->next;
	result = _tmp8_ != NULL;
	return result;
}


static gboolean gxml_glist_children_iterator_real_next (GeeIterator* base) {
	GXmlGListChildrenIterator * self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	xmlNode* _tmp1_ = NULL;
	xmlNode* _tmp2_ = NULL;
	xmlNode* _tmp3_ = NULL;
	xmlNode* _tmp6_ = NULL;
	xmlNode* _tmp7_ = NULL;
	xmlNode* _tmp8_ = NULL;
	xmlNode* _tmp9_ = NULL;
	self = (GXmlGListChildrenIterator*) base;
	_tmp0_ = gee_iterator_has_next ((GeeIterator*) self);
	if (!_tmp0_) {
		result = FALSE;
		return result;
	}
	_tmp1_ = self->priv->_node;
	_tmp2_ = _tmp1_->children;
	if (_tmp2_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp3_ = self->priv->_current;
	if (_tmp3_ == NULL) {
		xmlNode* _tmp4_ = NULL;
		xmlNode* _tmp5_ = NULL;
		_tmp4_ = self->priv->_node;
		_tmp5_ = _tmp4_->children;
		self->priv->_current = _tmp5_;
	}
	_tmp6_ = self->priv->_current;
	_tmp7_ = _tmp6_->next;
	if (_tmp7_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp8_ = self->priv->_current;
	_tmp9_ = _tmp8_->next;
	self->priv->_current = _tmp9_;
	result = TRUE;
	return result;
}


static void gxml_glist_children_iterator_real_remove (GeeIterator* base) {
	GXmlGListChildrenIterator * self;
	xmlNode* _tmp0_ = NULL;
	xmlNode* n = NULL;
	xmlNode* _tmp1_ = NULL;
	xmlNode* _tmp2_ = NULL;
	xmlNode* _tmp3_ = NULL;
	xmlNode* _tmp4_ = NULL;
	xmlNode* _tmp5_ = NULL;
	self = (GXmlGListChildrenIterator*) base;
	_tmp0_ = self->priv->_current;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->_current;
	n = _tmp1_;
	_tmp2_ = self->priv->_current;
	_tmp3_ = _tmp2_->prev;
	self->priv->_current = _tmp3_;
	_tmp4_ = n;
	xmlUnlinkNode (_tmp4_);
	_tmp5_ = n;
	xmlFreeNode (_tmp5_);
}


static gboolean gxml_glist_children_iterator_real_foreach (GeeTraversable* base, GeeForallFunc f, void* f_target) {
	GXmlGListChildrenIterator * self;
	gboolean result = FALSE;
	self = (GXmlGListChildrenIterator*) base;
	while (TRUE) {
		gboolean _tmp0_ = FALSE;
		GeeForallFunc _tmp1_ = NULL;
		void* _tmp1__target = NULL;
		gpointer _tmp2_ = NULL;
		gboolean _tmp3_ = FALSE;
		_tmp0_ = gee_iterator_has_next ((GeeIterator*) self);
		if (!_tmp0_) {
			break;
		}
		gee_iterator_next ((GeeIterator*) self);
		_tmp1_ = f;
		_tmp1__target = f_target;
		_tmp2_ = gee_iterator_get ((GeeIterator*) self);
		_tmp3_ = _tmp1_ ((GXmlNode*) _tmp2_, _tmp1__target);
		if (!_tmp3_) {
			result = FALSE;
			return result;
		}
	}
	result = TRUE;
	return result;
}


static gboolean gxml_glist_children_iterator_real_first (GeeBidirIterator* base) {
	GXmlGListChildrenIterator * self;
	gboolean result = FALSE;
	xmlNode* _tmp0_ = NULL;
	xmlNode* _tmp1_ = NULL;
	xmlNode* _tmp2_ = NULL;
	xmlNode* _tmp3_ = NULL;
	xmlNode* _tmp4_ = NULL;
	xmlNode* _tmp5_ = NULL;
	self = (GXmlGListChildrenIterator*) base;
	_tmp0_ = self->priv->_node;
	if (_tmp0_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp1_ = self->priv->_node;
	_tmp2_ = _tmp1_->children;
	if (_tmp2_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp3_ = self->priv->_node;
	_tmp4_ = _tmp3_->children;
	self->priv->_current = _tmp4_;
	_tmp5_ = self->priv->_current;
	result = _tmp5_ != NULL;
	return result;
}


static gboolean gxml_glist_children_iterator_real_has_previous (GeeBidirIterator* base) {
	GXmlGListChildrenIterator * self;
	gboolean result = FALSE;
	xmlNode* _tmp0_ = NULL;
	xmlNode* _tmp1_ = NULL;
	xmlNode* _tmp2_ = NULL;
	xmlNode* _tmp3_ = NULL;
	xmlNode* _tmp4_ = NULL;
	xmlNode* _tmp5_ = NULL;
	self = (GXmlGListChildrenIterator*) base;
	_tmp0_ = self->priv->_node;
	if (_tmp0_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp1_ = self->priv->_node;
	_tmp2_ = _tmp1_->children;
	if (_tmp2_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp3_ = self->priv->_current;
	if (_tmp3_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp4_ = self->priv->_current;
	_tmp5_ = _tmp4_->prev;
	if (_tmp5_ == NULL) {
		result = FALSE;
		return result;
	}
	result = TRUE;
	return result;
}


static gboolean gxml_glist_children_iterator_real_last (GeeBidirIterator* base) {
	GXmlGListChildrenIterator * self;
	gboolean result = FALSE;
	xmlNode* _tmp0_ = NULL;
	xmlNode* _tmp1_ = NULL;
	xmlNode* _tmp2_ = NULL;
	xmlNode* _tmp3_ = NULL;
	xmlNode* _tmp4_ = NULL;
	self = (GXmlGListChildrenIterator*) base;
	_tmp0_ = self->priv->_node;
	if (_tmp0_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp1_ = self->priv->_node;
	_tmp2_ = _tmp1_->children;
	if (_tmp2_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp3_ = self->priv->_node;
	_tmp4_ = _tmp3_->children;
	self->priv->_current = _tmp4_;
	while (TRUE) {
		xmlNode* _tmp5_ = NULL;
		xmlNode* _tmp6_ = NULL;
		xmlNode* _tmp7_ = NULL;
		xmlNode* _tmp8_ = NULL;
		_tmp5_ = self->priv->_current;
		_tmp6_ = _tmp5_->next;
		if (!(_tmp6_ != NULL)) {
			break;
		}
		_tmp7_ = self->priv->_current;
		_tmp8_ = _tmp7_->next;
		self->priv->_current = _tmp8_;
	}
	result = TRUE;
	return result;
}


static gboolean gxml_glist_children_iterator_real_previous (GeeBidirIterator* base) {
	GXmlGListChildrenIterator * self;
	gboolean result = FALSE;
	xmlNode* _tmp0_ = NULL;
	xmlNode* _tmp1_ = NULL;
	xmlNode* _tmp2_ = NULL;
	xmlNode* _tmp3_ = NULL;
	self = (GXmlGListChildrenIterator*) base;
	_tmp0_ = self->priv->_node;
	if (_tmp0_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp1_ = self->priv->_node;
	_tmp2_ = _tmp1_->children;
	if (_tmp2_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp3_ = self->priv->_current;
	if (_tmp3_ == NULL) {
		xmlNode* _tmp4_ = NULL;
		xmlNode* _tmp5_ = NULL;
		_tmp4_ = self->priv->_node;
		_tmp5_ = _tmp4_->children;
		self->priv->_current = _tmp5_;
		result = TRUE;
		return result;
	}
	while (TRUE) {
		xmlNode* _tmp6_ = NULL;
		xmlNode* _tmp7_ = NULL;
		xmlNode* _tmp8_ = NULL;
		xmlNode* _tmp9_ = NULL;
		_tmp6_ = self->priv->_current;
		_tmp7_ = _tmp6_->prev;
		if (!(_tmp7_ != NULL)) {
			break;
		}
		_tmp8_ = self->priv->_current;
		_tmp9_ = _tmp8_->prev;
		self->priv->_current = _tmp9_;
	}
	result = TRUE;
	return result;
}


static gboolean gxml_glist_children_iterator_real_get_read_only (GeeIterator* base) {
	gboolean result;
	GXmlGListChildrenIterator* self;
	self = (GXmlGListChildrenIterator*) base;
	result = FALSE;
	return result;
}


static gboolean gxml_glist_children_iterator_real_get_valid (GeeIterator* base) {
	gboolean result;
	GXmlGListChildrenIterator* self;
	xmlNode* _tmp0_ = NULL;
	self = (GXmlGListChildrenIterator*) base;
	_tmp0_ = self->priv->_current;
	result = _tmp0_ != NULL;
	return result;
}


static void gxml_glist_children_iterator_class_init (GXmlGListChildrenIteratorClass * klass) {
	gxml_glist_children_iterator_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GXmlGListChildrenIteratorPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_glist_children_iterator_get_property;
	G_OBJECT_CLASS (klass)->finalize = gxml_glist_children_iterator_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GLIST_CHILDREN_ITERATOR_READ_ONLY, g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GLIST_CHILDREN_ITERATOR_VALID, g_param_spec_boolean ("valid", "valid", "valid", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static GType gxml_glist_children_iterator_gee_traversable_get_g_type (GXmlGListChildrenIterator* self) {
	return GXML_TYPE_NODE;
}


static GBoxedCopyFunc gxml_glist_children_iterator_gee_traversable_get_g_dup_func (GXmlGListChildrenIterator* self) {
	return g_object_ref;
}


static GDestroyNotify gxml_glist_children_iterator_gee_traversable_get_g_destroy_func (GXmlGListChildrenIterator* self) {
	return g_object_unref;
}


static void gxml_glist_children_iterator_gee_traversable_interface_init (GeeTraversableIface * iface) {
	gxml_glist_children_iterator_gee_traversable_parent_iface = g_type_interface_peek_parent (iface);
	iface->foreach = (gboolean (*)(GeeTraversable*, GeeForallFunc, void*)) gxml_glist_children_iterator_real_foreach;
	iface->get_g_type = (GType(*)(GeeTraversable*)) gxml_glist_children_iterator_gee_traversable_get_g_type;
	iface->get_g_dup_func = (GBoxedCopyFunc(*)(GeeTraversable*)) gxml_glist_children_iterator_gee_traversable_get_g_dup_func;
	iface->get_g_destroy_func = (GDestroyNotify(*)(GeeTraversable*)) gxml_glist_children_iterator_gee_traversable_get_g_destroy_func;
}


static void gxml_glist_children_iterator_gee_iterator_interface_init (GeeIteratorIface * iface) {
	gxml_glist_children_iterator_gee_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->get = (gpointer (*)(GeeIterator*)) gxml_glist_children_iterator_real_get;
	iface->has_next = (gboolean (*)(GeeIterator*)) gxml_glist_children_iterator_real_has_next;
	iface->next = (gboolean (*)(GeeIterator*)) gxml_glist_children_iterator_real_next;
	iface->remove = (void (*)(GeeIterator*)) gxml_glist_children_iterator_real_remove;
	iface->get_read_only = gxml_glist_children_iterator_real_get_read_only;
	iface->get_valid = gxml_glist_children_iterator_real_get_valid;
}


static GType gxml_glist_children_iterator_gee_bidir_iterator_get_g_type (GXmlGListChildrenIterator* self) {
	return GXML_TYPE_NODE;
}


static GBoxedCopyFunc gxml_glist_children_iterator_gee_bidir_iterator_get_g_dup_func (GXmlGListChildrenIterator* self) {
	return g_object_ref;
}


static GDestroyNotify gxml_glist_children_iterator_gee_bidir_iterator_get_g_destroy_func (GXmlGListChildrenIterator* self) {
	return g_object_unref;
}


static void gxml_glist_children_iterator_gee_bidir_iterator_interface_init (GeeBidirIteratorIface * iface) {
	gxml_glist_children_iterator_gee_bidir_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->first = (gboolean (*)(GeeBidirIterator*)) gxml_glist_children_iterator_real_first;
	iface->has_previous = (gboolean (*)(GeeBidirIterator*)) gxml_glist_children_iterator_real_has_previous;
	iface->last = (gboolean (*)(GeeBidirIterator*)) gxml_glist_children_iterator_real_last;
	iface->previous = (gboolean (*)(GeeBidirIterator*)) gxml_glist_children_iterator_real_previous;
	iface->get_g_type = (GType(*)(GeeBidirIterator*)) gxml_glist_children_iterator_gee_bidir_iterator_get_g_type;
	iface->get_g_dup_func = (GBoxedCopyFunc(*)(GeeBidirIterator*)) gxml_glist_children_iterator_gee_bidir_iterator_get_g_dup_func;
	iface->get_g_destroy_func = (GDestroyNotify(*)(GeeBidirIterator*)) gxml_glist_children_iterator_gee_bidir_iterator_get_g_destroy_func;
}


static void gxml_glist_children_iterator_gee_list_iterator_interface_init (GeeListIteratorIface * iface) {
	gxml_glist_children_iterator_gee_list_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->add = (void (*)(GeeListIterator*, gconstpointer)) gxml_glist_children_iterator_real_add;
	iface->index = (gint (*)(GeeListIterator*)) gxml_glist_children_iterator_real_index;
	iface->set = (void (*)(GeeListIterator*, gconstpointer)) gxml_glist_children_iterator_real_set;
}


static GType gxml_glist_children_iterator_gee_bidir_list_iterator_get_g_type (GXmlGListChildrenIterator* self) {
	return GXML_TYPE_NODE;
}


static GBoxedCopyFunc gxml_glist_children_iterator_gee_bidir_list_iterator_get_g_dup_func (GXmlGListChildrenIterator* self) {
	return g_object_ref;
}


static GDestroyNotify gxml_glist_children_iterator_gee_bidir_list_iterator_get_g_destroy_func (GXmlGListChildrenIterator* self) {
	return g_object_unref;
}


static void gxml_glist_children_iterator_gee_bidir_list_iterator_interface_init (GeeBidirListIteratorIface * iface) {
	gxml_glist_children_iterator_gee_bidir_list_iterator_parent_iface = g_type_interface_peek_parent (iface);
	iface->insert = (void (*)(GeeBidirListIterator*, gconstpointer)) gxml_glist_children_iterator_real_insert;
	iface->get_g_type = (GType(*)(GeeBidirListIterator*)) gxml_glist_children_iterator_gee_bidir_list_iterator_get_g_type;
	iface->get_g_dup_func = (GBoxedCopyFunc(*)(GeeBidirListIterator*)) gxml_glist_children_iterator_gee_bidir_list_iterator_get_g_dup_func;
	iface->get_g_destroy_func = (GDestroyNotify(*)(GeeBidirListIterator*)) gxml_glist_children_iterator_gee_bidir_list_iterator_get_g_destroy_func;
}


static void gxml_glist_children_iterator_instance_init (GXmlGListChildrenIterator * self) {
	self->priv = GXML_GLIST_CHILDREN_ITERATOR_GET_PRIVATE (self);
	self->priv->i = 0;
}


static void gxml_glist_children_iterator_finalize (GObject* obj) {
	GXmlGListChildrenIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_GLIST_CHILDREN_TYPE_ITERATOR, GXmlGListChildrenIterator);
	_g_object_unref0 (self->priv->_doc);
	G_OBJECT_CLASS (gxml_glist_children_iterator_parent_class)->finalize (obj);
}


GType gxml_glist_children_iterator_get_type (void) {
	static volatile gsize gxml_glist_children_iterator_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_glist_children_iterator_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlGListChildrenIteratorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_glist_children_iterator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlGListChildrenIterator), 0, (GInstanceInitFunc) gxml_glist_children_iterator_instance_init, NULL };
		static const GInterfaceInfo gee_traversable_info = { (GInterfaceInitFunc) gxml_glist_children_iterator_gee_traversable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo gee_iterator_info = { (GInterfaceInitFunc) gxml_glist_children_iterator_gee_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo gee_bidir_iterator_info = { (GInterfaceInitFunc) gxml_glist_children_iterator_gee_bidir_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo gee_list_iterator_info = { (GInterfaceInitFunc) gxml_glist_children_iterator_gee_list_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo gee_bidir_list_iterator_info = { (GInterfaceInitFunc) gxml_glist_children_iterator_gee_bidir_list_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType gxml_glist_children_iterator_type_id;
		gxml_glist_children_iterator_type_id = g_type_register_static (G_TYPE_OBJECT, "GXmlGListChildrenIterator", &g_define_type_info, 0);
		g_type_add_interface_static (gxml_glist_children_iterator_type_id, GEE_TYPE_TRAVERSABLE, &gee_traversable_info);
		g_type_add_interface_static (gxml_glist_children_iterator_type_id, GEE_TYPE_ITERATOR, &gee_iterator_info);
		g_type_add_interface_static (gxml_glist_children_iterator_type_id, GEE_TYPE_BIDIR_ITERATOR, &gee_bidir_iterator_info);
		g_type_add_interface_static (gxml_glist_children_iterator_type_id, GEE_TYPE_LIST_ITERATOR, &gee_list_iterator_info);
		g_type_add_interface_static (gxml_glist_children_iterator_type_id, GEE_TYPE_BIDIR_LIST_ITERATOR, &gee_bidir_list_iterator_info);
		g_once_init_leave (&gxml_glist_children_iterator_type_id__volatile, gxml_glist_children_iterator_type_id);
	}
	return gxml_glist_children_iterator_type_id__volatile;
}


static void _vala_gxml_glist_children_iterator_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GXmlGListChildrenIterator * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_GLIST_CHILDREN_TYPE_ITERATOR, GXmlGListChildrenIterator);
	switch (property_id) {
		case GXML_GLIST_CHILDREN_ITERATOR_READ_ONLY:
		g_value_set_boolean (value, gee_iterator_get_read_only ((GeeIterator*) self));
		break;
		case GXML_GLIST_CHILDREN_ITERATOR_VALID:
		g_value_set_boolean (value, gee_iterator_get_valid ((GeeIterator*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void gxml_glist_children_class_init (GXmlGListChildrenClass * klass) {
	gxml_glist_children_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GXmlGListChildrenPrivate));
	((GeeAbstractBidirListClass *) klass)->bidir_list_iterator = gxml_glist_children_real_bidir_list_iterator;
	((GeeAbstractListClass *) klass)->get = gxml_glist_children_real_get;
	((GeeAbstractListClass *) klass)->index_of = gxml_glist_children_real_index_of;
	((GeeAbstractListClass *) klass)->insert = gxml_glist_children_real_insert;
	((GeeAbstractListClass *) klass)->list_iterator = gxml_glist_children_real_list_iterator;
	((GeeAbstractListClass *) klass)->remove_at = gxml_glist_children_real_remove_at;
	((GeeAbstractListClass *) klass)->set = gxml_glist_children_real_set;
	((GeeAbstractListClass *) klass)->slice = gxml_glist_children_real_slice;
	((GeeAbstractCollectionClass *) klass)->add = gxml_glist_children_real_add;
	((GeeAbstractCollectionClass *) klass)->clear = gxml_glist_children_real_clear;
	((GeeAbstractCollectionClass *) klass)->contains = gxml_glist_children_real_contains;
	((GeeAbstractCollectionClass *) klass)->iterator = gxml_glist_children_real_iterator;
	((GeeAbstractCollectionClass *) klass)->remove = gxml_glist_children_real_remove;
	GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_size = gxml_glist_children_real_get_size;
	GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_read_only = gxml_glist_children_real_get_read_only;
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_glist_children_get_property;
	G_OBJECT_CLASS (klass)->finalize = gxml_glist_children_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GLIST_CHILDREN_SIZE, g_param_spec_int ("size", "size", "size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GLIST_CHILDREN_READ_ONLY, g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void gxml_glist_children_instance_init (GXmlGListChildren * self) {
	self->priv = GXML_GLIST_CHILDREN_GET_PRIVATE (self);
	self->priv->_read_only = FALSE;
}


static void gxml_glist_children_finalize (GObject* obj) {
	GXmlGListChildren * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_GLIST_CHILDREN, GXmlGListChildren);
	_g_object_unref0 (self->priv->_doc);
	G_OBJECT_CLASS (gxml_glist_children_parent_class)->finalize (obj);
}


GType gxml_glist_children_get_type (void) {
	static volatile gsize gxml_glist_children_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_glist_children_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlGListChildrenClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_glist_children_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlGListChildren), 0, (GInstanceInitFunc) gxml_glist_children_instance_init, NULL };
		GType gxml_glist_children_type_id;
		gxml_glist_children_type_id = g_type_register_static (GEE_TYPE_ABSTRACT_BIDIR_LIST, "GXmlGListChildren", &g_define_type_info, 0);
		g_once_init_leave (&gxml_glist_children_type_id__volatile, gxml_glist_children_type_id);
	}
	return gxml_glist_children_type_id__volatile;
}


static void _vala_gxml_glist_children_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GXmlGListChildren * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_GLIST_CHILDREN, GXmlGListChildren);
	switch (property_id) {
		case GXML_GLIST_CHILDREN_SIZE:
		g_value_set_int (value, gee_abstract_collection_get_size ((GeeAbstractCollection*) self));
		break;
		case GXML_GLIST_CHILDREN_READ_ONLY:
		g_value_set_boolean (value, gee_abstract_collection_get_read_only ((GeeAbstractCollection*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



