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

/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 0; tab-width: 2 -*- */
/* ObjectModel.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 <stdlib.h>
#include <string.h>
#include <gee.h>
#include <gio/gio.h>
#include <libxml/tree.h>
#include <libxml/parser.h>


#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_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;
typedef struct _GXmlGNodePrivate GXmlGNodePrivate;

#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_GELEMENT (gxml_gelement_get_type ())
#define GXML_GELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GELEMENT, GXmlGElement))
#define GXML_GELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GELEMENT, GXmlGElementClass))
#define GXML_IS_GELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GELEMENT))
#define GXML_IS_GELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GELEMENT))
#define GXML_GELEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GELEMENT, GXmlGElementClass))

typedef struct _GXmlGElement GXmlGElement;
typedef struct _GXmlGElementClass GXmlGElementClass;

#define GXML_TYPE_GATTRIBUTE (gxml_gattribute_get_type ())
#define GXML_GATTRIBUTE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GATTRIBUTE, GXmlGAttribute))
#define GXML_GATTRIBUTE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GATTRIBUTE, GXmlGAttributeClass))
#define GXML_IS_GATTRIBUTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GATTRIBUTE))
#define GXML_IS_GATTRIBUTE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GATTRIBUTE))
#define GXML_GATTRIBUTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GATTRIBUTE, GXmlGAttributeClass))

typedef struct _GXmlGAttribute GXmlGAttribute;
typedef struct _GXmlGAttributeClass GXmlGAttributeClass;

#define GXML_TYPE_GTEXT (gxml_gtext_get_type ())
#define GXML_GTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GTEXT, GXmlGText))
#define GXML_GTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GTEXT, GXmlGTextClass))
#define GXML_IS_GTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GTEXT))
#define GXML_IS_GTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GTEXT))
#define GXML_GTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GTEXT, GXmlGTextClass))

typedef struct _GXmlGText GXmlGText;
typedef struct _GXmlGTextClass GXmlGTextClass;

#define GXML_TYPE_GCDATA (gxml_gcdata_get_type ())
#define GXML_GCDATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GCDATA, GXmlGCDATA))
#define GXML_GCDATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GCDATA, GXmlGCDATAClass))
#define GXML_IS_GCDATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GCDATA))
#define GXML_IS_GCDATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GCDATA))
#define GXML_GCDATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GCDATA, GXmlGCDATAClass))

typedef struct _GXmlGCDATA GXmlGCDATA;
typedef struct _GXmlGCDATAClass GXmlGCDATAClass;

#define GXML_TYPE_GPROCESSING_INSTRUCTION (gxml_gprocessing_instruction_get_type ())
#define GXML_GPROCESSING_INSTRUCTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GPROCESSING_INSTRUCTION, GXmlGProcessingInstruction))
#define GXML_GPROCESSING_INSTRUCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GPROCESSING_INSTRUCTION, GXmlGProcessingInstructionClass))
#define GXML_IS_GPROCESSING_INSTRUCTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GPROCESSING_INSTRUCTION))
#define GXML_IS_GPROCESSING_INSTRUCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GPROCESSING_INSTRUCTION))
#define GXML_GPROCESSING_INSTRUCTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GPROCESSING_INSTRUCTION, GXmlGProcessingInstructionClass))

typedef struct _GXmlGProcessingInstruction GXmlGProcessingInstruction;
typedef struct _GXmlGProcessingInstructionClass GXmlGProcessingInstructionClass;

#define GXML_TYPE_GCOMMENT (gxml_gcomment_get_type ())
#define GXML_GCOMMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GCOMMENT, GXmlGComment))
#define GXML_GCOMMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GCOMMENT, GXmlGCommentClass))
#define GXML_IS_GCOMMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GCOMMENT))
#define GXML_IS_GCOMMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GCOMMENT))
#define GXML_GCOMMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GCOMMENT, GXmlGCommentClass))

typedef struct _GXmlGComment GXmlGComment;
typedef struct _GXmlGCommentClass GXmlGCommentClass;

#define GXML_TYPE_GHASH_MAP_ATTR (gxml_ghash_map_attr_get_type ())
#define GXML_GHASH_MAP_ATTR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GHASH_MAP_ATTR, GXmlGHashMapAttr))
#define GXML_GHASH_MAP_ATTR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GHASH_MAP_ATTR, GXmlGHashMapAttrClass))
#define GXML_IS_GHASH_MAP_ATTR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GHASH_MAP_ATTR))
#define GXML_IS_GHASH_MAP_ATTR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GHASH_MAP_ATTR))
#define GXML_GHASH_MAP_ATTR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GHASH_MAP_ATTR, GXmlGHashMapAttrClass))

typedef struct _GXmlGHashMapAttr GXmlGHashMapAttr;
typedef struct _GXmlGHashMapAttrClass GXmlGHashMapAttrClass;

#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;

#define GXML_TYPE_GLIST_NAMESPACES (gxml_glist_namespaces_get_type ())
#define GXML_GLIST_NAMESPACES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GLIST_NAMESPACES, GXmlGListNamespaces))
#define GXML_GLIST_NAMESPACES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GLIST_NAMESPACES, GXmlGListNamespacesClass))
#define GXML_IS_GLIST_NAMESPACES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GLIST_NAMESPACES))
#define GXML_IS_GLIST_NAMESPACES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GLIST_NAMESPACES))
#define GXML_GLIST_NAMESPACES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GLIST_NAMESPACES, GXmlGListNamespacesClass))

typedef struct _GXmlGListNamespaces GXmlGListNamespaces;
typedef struct _GXmlGListNamespacesClass GXmlGListNamespacesClass;

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 _GXmlGNode {
	GObject parent_instance;
	GXmlGNodePrivate * priv;
	GXmlGDocument* _doc;
	xmlNode* _node;
};

struct _GXmlGNodeClass {
	GObjectClass parent_class;
	gboolean (*set_namespace) (GXmlGNode* self, const gchar* uri, const gchar* prefix);
	gchar* (*to_string) (GXmlGNode* self);
	GeeMap* (*get_attrs) (GXmlGNode* self);
	GeeBidirList* (*get_children) (GXmlGNode* self);
	GeeList* (*get_namespaces) (GXmlGNode* self);
	GXmlDocument* (*get_document) (GXmlGNode* self);
	GXmlNode* (*get_parent) (GXmlGNode* self);
	GXmlNodeType (*get_type_node) (GXmlGNode* self);
	gchar* (*get_name) (GXmlGNode* self);
	gchar* (*get_value) (GXmlGNode* self);
	void (*set_value) (GXmlGNode* self, const gchar* value);
};


static gpointer gxml_gnode_parent_class = NULL;
static GXmlNodeIface* gxml_gnode_gxml_node_parent_iface = NULL;

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;
GType gxml_gnode_get_type (void) G_GNUC_CONST;
GType gxml_gdocument_get_type (void) G_GNUC_CONST;
enum  {
	GXML_GNODE_DUMMY_PROPERTY,
	GXML_GNODE_ATTRS,
	GXML_GNODE_CHILDREN,
	GXML_GNODE_NAMESPACES,
	GXML_GNODE_DOCUMENT,
	GXML_GNODE_PARENT,
	GXML_GNODE_TYPE_NODE,
	GXML_GNODE_NAME,
	GXML_GNODE_VALUE
};
gboolean gxml_gnode_set_namespace (GXmlGNode* self, const gchar* uri, const gchar* prefix);
static gboolean gxml_gnode_real_set_namespace (GXmlGNode* self, const gchar* uri, const gchar* prefix);
gchar* gxml_gnode_to_string (GXmlGNode* self);
static gchar* gxml_gnode_real_to_string (GXmlGNode* self);
xmlNode* gxml_gnode_get_internal_node (GXmlGNode* self);
GXmlNode* gxml_gnode_to_gnode (GXmlGDocument* doc, xmlNode* node);
GXmlGElement* gxml_gelement_new (GXmlGDocument* doc, xmlNode* node);
GXmlGElement* gxml_gelement_construct (GType object_type, GXmlGDocument* doc, xmlNode* node);
GType gxml_gelement_get_type (void) G_GNUC_CONST;
GXmlGAttribute* gxml_gattribute_new (GXmlGDocument* doc, xmlAttr* node);
GXmlGAttribute* gxml_gattribute_construct (GType object_type, GXmlGDocument* doc, xmlAttr* node);
GType gxml_gattribute_get_type (void) G_GNUC_CONST;
GXmlGText* gxml_gtext_new (GXmlGDocument* doc, xmlNode* node);
GXmlGText* gxml_gtext_construct (GType object_type, GXmlGDocument* doc, xmlNode* node);
GType gxml_gtext_get_type (void) G_GNUC_CONST;
GXmlGCDATA* gxml_gcdata_new (GXmlGDocument* doc, xmlNode* node);
GXmlGCDATA* gxml_gcdata_construct (GType object_type, GXmlGDocument* doc, xmlNode* node);
GType gxml_gcdata_get_type (void) G_GNUC_CONST;
GXmlGProcessingInstruction* gxml_gprocessing_instruction_new (GXmlGDocument* doc, xmlNode* node);
GXmlGProcessingInstruction* gxml_gprocessing_instruction_construct (GType object_type, GXmlGDocument* doc, xmlNode* node);
GType gxml_gprocessing_instruction_get_type (void) G_GNUC_CONST;
GXmlGComment* gxml_gcomment_new (GXmlGDocument* doc, xmlNode* node);
GXmlGComment* gxml_gcomment_construct (GType object_type, GXmlGDocument* doc, xmlNode* node);
GType gxml_gcomment_get_type (void) G_GNUC_CONST;
GXmlGDocument* gxml_gdocument_new_from_doc (xmlDoc* doc);
GXmlGDocument* gxml_gdocument_construct_from_doc (GType object_type, xmlDoc* doc);
GXmlGNode* gxml_gnode_construct (GType object_type);
GeeMap* gxml_gnode_get_attrs (GXmlGNode* self);
GXmlGHashMapAttr* gxml_ghash_map_attr_new (GXmlGDocument* doc, xmlNode* node);
GXmlGHashMapAttr* gxml_ghash_map_attr_construct (GType object_type, GXmlGDocument* doc, xmlNode* node);
GType gxml_ghash_map_attr_get_type (void) G_GNUC_CONST;
GeeBidirList* gxml_gnode_get_children (GXmlGNode* self);
GXmlGListChildren* gxml_glist_children_new (GXmlGDocument* doc, xmlNode* node);
GXmlGListChildren* gxml_glist_children_construct (GType object_type, GXmlGDocument* doc, xmlNode* node);
GType gxml_glist_children_get_type (void) G_GNUC_CONST;
GeeList* gxml_gnode_get_namespaces (GXmlGNode* self);
GXmlGListNamespaces* gxml_glist_namespaces_new (GXmlGDocument* doc, xmlNode* node);
GXmlGListNamespaces* gxml_glist_namespaces_construct (GType object_type, GXmlGDocument* doc, xmlNode* node);
GType gxml_glist_namespaces_get_type (void) G_GNUC_CONST;
GXmlDocument* gxml_gnode_get_document (GXmlGNode* self);
GXmlNode* gxml_gnode_get_parent (GXmlGNode* self);
GXmlNodeType gxml_gnode_get_type_node (GXmlGNode* self);
gchar* gxml_gnode_get_name (GXmlGNode* self);
gchar* gxml_gnode_get_value (GXmlGNode* self);
void gxml_gnode_set_value (GXmlGNode* self, const gchar* value);
static GObject * gxml_gnode_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
void gxml_init_init (void);
static void gxml_gnode_finalize (GObject* obj);
static void _vala_gxml_gnode_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_gxml_gnode_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


static gboolean gxml_gnode_real_set_namespace (GXmlGNode* self, const gchar* uri, const gchar* prefix) {
	gboolean result = FALSE;
	xmlNode* _tmp0_ = NULL;
	xmlNode* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	xmlNs* _tmp4_ = NULL;
	g_return_val_if_fail (uri != NULL, FALSE);
	_tmp0_ = self->_node;
	if (_tmp0_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp1_ = self->_node;
	_tmp2_ = uri;
	_tmp3_ = prefix;
	_tmp4_ = xmlNewNs (_tmp1_, (xmlChar*) _tmp2_, (xmlChar*) _tmp3_);
	result = _tmp4_ != NULL;
	return result;
}


gboolean gxml_gnode_set_namespace (GXmlGNode* self, const gchar* uri, const gchar* prefix) {
	g_return_val_if_fail (self != NULL, FALSE);
	return GXML_GNODE_GET_CLASS (self)->set_namespace (self, uri, prefix);
}


static gchar* gxml_gnode_real_to_string (GXmlGNode* self) {
	gchar* result = NULL;
	GType _tmp0_ = 0UL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	_tmp0_ = G_TYPE_FROM_INSTANCE ((GObject*) self);
	_tmp1_ = g_type_name (_tmp0_);
	_tmp2_ = g_strdup (_tmp1_);
	result = _tmp2_;
	return result;
}


gchar* gxml_gnode_to_string (GXmlGNode* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_GNODE_GET_CLASS (self)->to_string (self);
}


xmlNode* gxml_gnode_get_internal_node (GXmlGNode* self) {
	xmlNode* result = NULL;
	xmlNode* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->_node;
	result = _tmp0_;
	return result;
}


GXmlNode* gxml_gnode_to_gnode (GXmlGDocument* doc, xmlNode* node) {
	GXmlNode* result = NULL;
	GXmlNodeType t = 0;
	xmlNode* _tmp0_ = NULL;
	xmlElementType _tmp1_ = 0;
	GXmlNodeType _tmp2_ = 0;
	g_return_val_if_fail (doc != NULL, NULL);
	_tmp0_ = node;
	_tmp1_ = _tmp0_->type;
	t = (GXmlNodeType) _tmp1_;
	_tmp2_ = t;
	switch (_tmp2_) {
		case GXML_NODE_TYPE_ELEMENT:
		{
			GXmlGDocument* _tmp3_ = NULL;
			xmlNode* _tmp4_ = NULL;
			GXmlGElement* _tmp5_ = NULL;
			_tmp3_ = doc;
			_tmp4_ = node;
			_tmp5_ = gxml_gelement_new (_tmp3_, _tmp4_);
			result = (GXmlNode*) _tmp5_;
			return result;
		}
		case GXML_NODE_TYPE_ATTRIBUTE:
		{
			GXmlGDocument* _tmp6_ = NULL;
			xmlNode* _tmp7_ = NULL;
			GXmlGAttribute* _tmp8_ = NULL;
			_tmp6_ = doc;
			_tmp7_ = node;
			_tmp8_ = gxml_gattribute_new (_tmp6_, (xmlAttr*) _tmp7_);
			result = (GXmlNode*) _tmp8_;
			return result;
		}
		case GXML_NODE_TYPE_TEXT:
		{
			GXmlGDocument* _tmp9_ = NULL;
			xmlNode* _tmp10_ = NULL;
			GXmlGText* _tmp11_ = NULL;
			_tmp9_ = doc;
			_tmp10_ = node;
			_tmp11_ = gxml_gtext_new (_tmp9_, _tmp10_);
			result = (GXmlNode*) _tmp11_;
			return result;
		}
		case GXML_NODE_TYPE_CDATA_SECTION:
		{
			GXmlGDocument* _tmp12_ = NULL;
			xmlNode* _tmp13_ = NULL;
			GXmlGCDATA* _tmp14_ = NULL;
			_tmp12_ = doc;
			_tmp13_ = node;
			_tmp14_ = gxml_gcdata_new (_tmp12_, _tmp13_);
			result = (GXmlNode*) _tmp14_;
			return result;
		}
		case GXML_NODE_TYPE_ENTITY_REFERENCE:
		{
			result = NULL;
			return result;
		}
		case GXML_NODE_TYPE_ENTITY:
		{
			result = NULL;
			return result;
		}
		case GXML_NODE_TYPE_PROCESSING_INSTRUCTION:
		{
			GXmlGDocument* _tmp15_ = NULL;
			xmlNode* _tmp16_ = NULL;
			GXmlGProcessingInstruction* _tmp17_ = NULL;
			_tmp15_ = doc;
			_tmp16_ = node;
			_tmp17_ = gxml_gprocessing_instruction_new (_tmp15_, _tmp16_);
			result = (GXmlNode*) _tmp17_;
			return result;
		}
		case GXML_NODE_TYPE_COMMENT:
		{
			GXmlGDocument* _tmp18_ = NULL;
			xmlNode* _tmp19_ = NULL;
			GXmlGComment* _tmp20_ = NULL;
			_tmp18_ = doc;
			_tmp19_ = node;
			_tmp20_ = gxml_gcomment_new (_tmp18_, _tmp19_);
			result = (GXmlNode*) _tmp20_;
			return result;
		}
		case GXML_NODE_TYPE_DOCUMENT:
		{
			xmlNode* _tmp21_ = NULL;
			xmlDoc* _tmp22_ = NULL;
			GXmlGDocument* _tmp23_ = NULL;
			_tmp21_ = node;
			_tmp22_ = _tmp21_->doc;
			_tmp23_ = gxml_gdocument_new_from_doc (_tmp22_);
			result = (GXmlNode*) _tmp23_;
			return result;
		}
		case GXML_NODE_TYPE_DOCUMENT_TYPE:
		{
			result = NULL;
			return result;
		}
		case GXML_NODE_TYPE_DOCUMENT_FRAGMENT:
		{
			result = NULL;
			return result;
		}
		case GXML_NODE_TYPE_NOTATION:
		{
			result = NULL;
			return result;
		}
		default:
		break;
	}
	result = NULL;
	return result;
}


GXmlGNode* gxml_gnode_construct (GType object_type) {
	GXmlGNode * self = NULL;
	self = (GXmlGNode*) g_object_new (object_type, NULL);
	return self;
}


GeeMap* gxml_gnode_get_attrs (GXmlGNode* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_GNODE_GET_CLASS (self)->get_attrs (self);
}


static GeeMap* gxml_gnode_real_get_attrs (GXmlGNode* base) {
	GeeMap* result;
	GXmlGNode* self;
	GXmlGDocument* _tmp0_ = NULL;
	xmlNode* _tmp1_ = NULL;
	GXmlGHashMapAttr* _tmp2_ = NULL;
	self = base;
	_tmp0_ = self->_doc;
	_tmp1_ = self->_node;
	_tmp2_ = gxml_ghash_map_attr_new (_tmp0_, _tmp1_);
	result = (GeeMap*) _tmp2_;
	return result;
}


GeeBidirList* gxml_gnode_get_children (GXmlGNode* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_GNODE_GET_CLASS (self)->get_children (self);
}


static GeeBidirList* gxml_gnode_real_get_children (GXmlGNode* base) {
	GeeBidirList* result;
	GXmlGNode* self;
	GXmlGDocument* _tmp0_ = NULL;
	xmlNode* _tmp1_ = NULL;
	GXmlGListChildren* _tmp2_ = NULL;
	self = base;
	_tmp0_ = self->_doc;
	_tmp1_ = self->_node;
	_tmp2_ = gxml_glist_children_new (_tmp0_, _tmp1_);
	result = (GeeBidirList*) _tmp2_;
	return result;
}


GeeList* gxml_gnode_get_namespaces (GXmlGNode* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_GNODE_GET_CLASS (self)->get_namespaces (self);
}


static GeeList* gxml_gnode_real_get_namespaces (GXmlGNode* base) {
	GeeList* result;
	GXmlGNode* self;
	GXmlGDocument* _tmp0_ = NULL;
	xmlNode* _tmp1_ = NULL;
	GXmlGListNamespaces* _tmp2_ = NULL;
	self = base;
	_tmp0_ = self->_doc;
	_tmp1_ = self->_node;
	_tmp2_ = gxml_glist_namespaces_new (_tmp0_, _tmp1_);
	result = (GeeList*) _tmp2_;
	return result;
}


GXmlDocument* gxml_gnode_get_document (GXmlGNode* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_GNODE_GET_CLASS (self)->get_document (self);
}


static GXmlDocument* gxml_gnode_real_get_document (GXmlGNode* base) {
	GXmlDocument* result;
	GXmlGNode* self;
	GXmlGDocument* _tmp0_ = NULL;
	self = base;
	_tmp0_ = self->_doc;
	result = (GXmlDocument*) _tmp0_;
	return result;
}


GXmlNode* gxml_gnode_get_parent (GXmlGNode* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_GNODE_GET_CLASS (self)->get_parent (self);
}


static GXmlNode* gxml_gnode_real_get_parent (GXmlGNode* base) {
	GXmlNode* result;
	GXmlGNode* self;
	xmlNode* _tmp0_ = NULL;
	GXmlDocument* _tmp1_ = NULL;
	GXmlDocument* _tmp2_ = NULL;
	xmlNode* _tmp3_ = NULL;
	xmlNode* _tmp4_ = NULL;
	GXmlNode* _tmp5_ = NULL;
	self = base;
	_tmp0_ = self->_node;
	if (_tmp0_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp1_ = gxml_gnode_get_document (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->_node;
	_tmp4_ = _tmp3_->parent;
	_tmp5_ = gxml_gnode_to_gnode (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, GXML_TYPE_GDOCUMENT) ? ((GXmlGDocument*) _tmp2_) : NULL, _tmp4_);
	result = _tmp5_;
	return result;
}


GXmlNodeType gxml_gnode_get_type_node (GXmlGNode* self) {
	g_return_val_if_fail (self != NULL, 0);
	return GXML_GNODE_GET_CLASS (self)->get_type_node (self);
}


static GXmlNodeType gxml_gnode_real_get_type_node (GXmlGNode* base) {
	GXmlNodeType result;
	GXmlGNode* self;
	xmlNode* _tmp0_ = NULL;
	xmlNode* _tmp1_ = NULL;
	xmlElementType _tmp2_ = 0;
	self = base;
	_tmp0_ = self->_node;
	if (_tmp0_ == NULL) {
		result = GXML_NODE_TYPE_X_UNKNOWN;
		return result;
	}
	_tmp1_ = self->_node;
	_tmp2_ = _tmp1_->type;
	result = (GXmlNodeType) _tmp2_;
	return result;
}


gchar* gxml_gnode_get_name (GXmlGNode* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_GNODE_GET_CLASS (self)->get_name (self);
}


static gchar* gxml_gnode_real_get_name (GXmlGNode* base) {
	gchar* result;
	GXmlGNode* self;
	xmlNode* _tmp0_ = NULL;
	xmlNode* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	self = base;
	_tmp0_ = self->_node;
	if (_tmp0_ == NULL) {
		gchar* _tmp1_ = NULL;
		_tmp1_ = g_strdup ("#noname");
		result = _tmp1_;
		return result;
	}
	_tmp2_ = self->_node;
	_tmp3_ = _tmp2_->name;
	_tmp4_ = g_strdup (_tmp3_);
	result = _tmp4_;
	return result;
}


gchar* gxml_gnode_get_value (GXmlGNode* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_GNODE_GET_CLASS (self)->get_value (self);
}


static gchar* gxml_gnode_real_get_value (GXmlGNode* base) {
	gchar* result;
	GXmlGNode* self;
	xmlNode* _tmp0_ = NULL;
	xmlNode* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	self = base;
	_tmp0_ = self->_node;
	if (_tmp0_ == NULL) {
		gchar* _tmp1_ = NULL;
		_tmp1_ = g_strdup ("");
		result = _tmp1_;
		return result;
	}
	_tmp2_ = self->_node;
	_tmp3_ = (gchar*) xmlNodeGetContent (_tmp2_);
	result = _tmp3_;
	return result;
}


void gxml_gnode_set_value (GXmlGNode* self, const gchar* value) {
	g_return_if_fail (self != NULL);
	GXML_GNODE_GET_CLASS (self)->set_value (self, value);
}


static void gxml_gnode_real_set_value (GXmlGNode* base, const gchar* value) {
	GXmlGNode* self;
	xmlNode* _tmp0_ = NULL;
	xmlNode* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	self = base;
	_tmp0_ = self->_node;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->_node;
	_tmp2_ = value;
	xmlNodeSetContent (_tmp1_, (xmlChar*) _tmp2_);
	g_object_notify ((GObject *) self, "value");
}


static GObject * gxml_gnode_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	GXmlGNode * self;
	parent_class = G_OBJECT_CLASS (gxml_gnode_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_GNODE, GXmlGNode);
	gxml_init_init ();
	return obj;
}


static void gxml_gnode_class_init (GXmlGNodeClass * klass) {
	gxml_gnode_parent_class = g_type_class_peek_parent (klass);
	((GXmlGNodeClass *) klass)->set_namespace = gxml_gnode_real_set_namespace;
	((GXmlGNodeClass *) klass)->to_string = gxml_gnode_real_to_string;
	GXML_GNODE_CLASS (klass)->get_attrs = gxml_gnode_real_get_attrs;
	GXML_GNODE_CLASS (klass)->get_children = gxml_gnode_real_get_children;
	GXML_GNODE_CLASS (klass)->get_namespaces = gxml_gnode_real_get_namespaces;
	GXML_GNODE_CLASS (klass)->get_document = gxml_gnode_real_get_document;
	GXML_GNODE_CLASS (klass)->get_parent = gxml_gnode_real_get_parent;
	GXML_GNODE_CLASS (klass)->get_type_node = gxml_gnode_real_get_type_node;
	GXML_GNODE_CLASS (klass)->get_name = gxml_gnode_real_get_name;
	GXML_GNODE_CLASS (klass)->get_value = gxml_gnode_real_get_value;
	GXML_GNODE_CLASS (klass)->set_value = gxml_gnode_real_set_value;
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_gnode_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gxml_gnode_set_property;
	G_OBJECT_CLASS (klass)->constructor = gxml_gnode_constructor;
	G_OBJECT_CLASS (klass)->finalize = gxml_gnode_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_ATTRS, g_param_spec_object ("attrs", "attrs", "attrs", GEE_TYPE_MAP, 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_GNODE_CHILDREN, g_param_spec_object ("children", "children", "children", GEE_TYPE_BIDIR_LIST, 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_GNODE_NAMESPACES, g_param_spec_object ("namespaces", "namespaces", "namespaces", GEE_TYPE_LIST, 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_GNODE_DOCUMENT, g_param_spec_object ("document", "document", "document", GXML_TYPE_DOCUMENT, 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_GNODE_PARENT, g_param_spec_object ("parent", "parent", "parent", GXML_TYPE_NODE, 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_GNODE_TYPE_NODE, g_param_spec_enum ("type-node", "type-node", "type-node", GXML_TYPE_NODE_TYPE, 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_GNODE_NAME, g_param_spec_string ("name", "name", "name", NULL, 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_GNODE_VALUE, g_param_spec_string ("value", "value", "value", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void gxml_gnode_gxml_node_interface_init (GXmlNodeIface * iface) {
	gxml_gnode_gxml_node_parent_iface = g_type_interface_peek_parent (iface);
	iface->set_namespace = (gboolean (*)(GXmlNode*, const gchar*, const gchar*)) gxml_gnode_set_namespace;
	iface->to_string = (gchar* (*)(GXmlNode*)) gxml_gnode_to_string;
	iface->get_attrs = (GeeMap* (*) (GXmlNode *)) gxml_gnode_get_attrs;
	iface->get_children = (GeeBidirList* (*) (GXmlNode *)) gxml_gnode_get_children;
	iface->get_namespaces = (GeeList* (*) (GXmlNode *)) gxml_gnode_get_namespaces;
	iface->get_document = (GXmlDocument* (*) (GXmlNode *)) gxml_gnode_get_document;
	iface->get_parent = (GXmlNode* (*) (GXmlNode *)) gxml_gnode_get_parent;
	iface->get_type_node = (GXmlNodeType (*) (GXmlNode *)) gxml_gnode_get_type_node;
	iface->get_name = (gchar* (*) (GXmlNode *)) gxml_gnode_get_name;
	iface->get_value = (gchar* (*) (GXmlNode *)) gxml_gnode_get_value;
	iface->set_value = (void (*) (GXmlNode *, const gchar*)) gxml_gnode_set_value;
}


static void gxml_gnode_instance_init (GXmlGNode * self) {
}


static void gxml_gnode_finalize (GObject* obj) {
	GXmlGNode * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_GNODE, GXmlGNode);
	_g_object_unref0 (self->_doc);
	G_OBJECT_CLASS (gxml_gnode_parent_class)->finalize (obj);
}


/**
 * Base interface providing basic functionalities to all GXml interfaces.
 */
GType gxml_gnode_get_type (void) {
	static volatile gsize gxml_gnode_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_gnode_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlGNodeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_gnode_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlGNode), 0, (GInstanceInitFunc) gxml_gnode_instance_init, NULL };
		static const GInterfaceInfo gxml_node_info = { (GInterfaceInitFunc) gxml_gnode_gxml_node_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType gxml_gnode_type_id;
		gxml_gnode_type_id = g_type_register_static (G_TYPE_OBJECT, "GXmlGNode", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_type_add_interface_static (gxml_gnode_type_id, GXML_TYPE_NODE, &gxml_node_info);
		g_once_init_leave (&gxml_gnode_type_id__volatile, gxml_gnode_type_id);
	}
	return gxml_gnode_type_id__volatile;
}


static void _vala_gxml_gnode_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GXmlGNode * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_GNODE, GXmlGNode);
	switch (property_id) {
		case GXML_GNODE_ATTRS:
		g_value_take_object (value, gxml_gnode_get_attrs (self));
		break;
		case GXML_GNODE_CHILDREN:
		g_value_take_object (value, gxml_gnode_get_children (self));
		break;
		case GXML_GNODE_NAMESPACES:
		g_value_take_object (value, gxml_gnode_get_namespaces (self));
		break;
		case GXML_GNODE_DOCUMENT:
		g_value_set_object (value, gxml_gnode_get_document (self));
		break;
		case GXML_GNODE_PARENT:
		g_value_take_object (value, gxml_gnode_get_parent (self));
		break;
		case GXML_GNODE_TYPE_NODE:
		g_value_set_enum (value, gxml_gnode_get_type_node (self));
		break;
		case GXML_GNODE_NAME:
		g_value_take_string (value, gxml_gnode_get_name (self));
		break;
		case GXML_GNODE_VALUE:
		g_value_take_string (value, gxml_gnode_get_value (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_gxml_gnode_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GXmlGNode * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_GNODE, GXmlGNode);
	switch (property_id) {
		case GXML_GNODE_VALUE:
		gxml_gnode_set_value (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



