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

/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */
/* Attr.vala
 *
 * Copyright (C) 2011-2013  Richard Schwarting <aquarichy@gmail.com>
 * Copyright (C) 2011,2015-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, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Authors:
 *      Richard Schwarting <aquarichy@gmail.com>
 *      Daniel Espinosa <esodan@gmail.com>
 */
/* NOTE: attributes may contain trees as references, for entity references */
/* TODO: figure out whether, if in Element we use set_attribute and
 * change one, whether an Attr node should have its value replaced */
/* allowed values defined in a separate DTD; we won't be parsing those :D */
/* NOTE: default values: complex, might want a hash table storing them for each attribute name */
/* NOTE: children might contain Text or Entity references */
/* NOTE: might want to base this on Xml.Attribute instead (can we?) */
/* NOTE: specified is false if it wasn't set, but was created because it still supplied a default value, I think */
/* NOTE: figure out how entity references work with Attrs */
/* NOTE: value as children nodes: can contain Text and EntityReferences */

#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_XNODE (gxml_xnode_get_type ())
#define GXML_XNODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_XNODE, GXmlxNode))
#define GXML_XNODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_XNODE, GXmlxNodeClass))
#define GXML_IS_XNODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_XNODE))
#define GXML_IS_XNODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_XNODE))
#define GXML_XNODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_XNODE, GXmlxNodeClass))

typedef struct _GXmlxNode GXmlxNode;
typedef struct _GXmlxNodeClass GXmlxNodeClass;
typedef struct _GXmlxNodePrivate GXmlxNodePrivate;

#define GXML_TYPE_NAMESPACE_ATTR (gxml_namespace_attr_get_type ())
#define GXML_NAMESPACE_ATTR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_NAMESPACE_ATTR, GXmlNamespaceAttr))
#define GXML_NAMESPACE_ATTR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_NAMESPACE_ATTR, GXmlNamespaceAttrClass))
#define GXML_IS_NAMESPACE_ATTR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_NAMESPACE_ATTR))
#define GXML_IS_NAMESPACE_ATTR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_NAMESPACE_ATTR))
#define GXML_NAMESPACE_ATTR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_NAMESPACE_ATTR, GXmlNamespaceAttrClass))

typedef struct _GXmlNamespaceAttr GXmlNamespaceAttr;
typedef struct _GXmlNamespaceAttrClass GXmlNamespaceAttrClass;

#define GXML_TYPE_XNODE_LIST (gxml_xnode_list_get_type ())
#define GXML_XNODE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_XNODE_LIST, GXmlxNodeList))
#define GXML_IS_XNODE_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_XNODE_LIST))
#define GXML_XNODE_LIST_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_XNODE_LIST, GXmlxNodeListIface))

typedef struct _GXmlxNodeList GXmlxNodeList;
typedef struct _GXmlxNodeListIface GXmlxNodeListIface;

#define GXML_TYPE_ABSTRACT_NAMED_ATTR_MAP (gxml_abstract_named_attr_map_get_type ())
#define GXML_ABSTRACT_NAMED_ATTR_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_ABSTRACT_NAMED_ATTR_MAP, GXmlAbstractNamedAttrMap))
#define GXML_ABSTRACT_NAMED_ATTR_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_ABSTRACT_NAMED_ATTR_MAP, GXmlAbstractNamedAttrMapClass))
#define GXML_IS_ABSTRACT_NAMED_ATTR_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_ABSTRACT_NAMED_ATTR_MAP))
#define GXML_IS_ABSTRACT_NAMED_ATTR_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_ABSTRACT_NAMED_ATTR_MAP))
#define GXML_ABSTRACT_NAMED_ATTR_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_ABSTRACT_NAMED_ATTR_MAP, GXmlAbstractNamedAttrMapClass))

typedef struct _GXmlAbstractNamedAttrMap GXmlAbstractNamedAttrMap;
typedef struct _GXmlAbstractNamedAttrMapClass GXmlAbstractNamedAttrMapClass;

#define GXML_TYPE_NAMED_ATTR_MAP (gxml_named_attr_map_get_type ())
#define GXML_NAMED_ATTR_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_NAMED_ATTR_MAP, GXmlNamedAttrMap))
#define GXML_NAMED_ATTR_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_NAMED_ATTR_MAP, GXmlNamedAttrMapClass))
#define GXML_IS_NAMED_ATTR_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_NAMED_ATTR_MAP))
#define GXML_IS_NAMED_ATTR_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_NAMED_ATTR_MAP))
#define GXML_NAMED_ATTR_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_NAMED_ATTR_MAP, GXmlNamedAttrMapClass))

typedef struct _GXmlNamedAttrMap GXmlNamedAttrMap;
typedef struct _GXmlNamedAttrMapClass GXmlNamedAttrMapClass;

#define GXML_TYPE_ABSTRACT_NAMESPACE_ATTR_NODE_LIST (gxml_abstract_namespace_attr_node_list_get_type ())
#define GXML_ABSTRACT_NAMESPACE_ATTR_NODE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_ABSTRACT_NAMESPACE_ATTR_NODE_LIST, GXmlAbstractNamespaceAttrNodeList))
#define GXML_ABSTRACT_NAMESPACE_ATTR_NODE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_ABSTRACT_NAMESPACE_ATTR_NODE_LIST, GXmlAbstractNamespaceAttrNodeListClass))
#define GXML_IS_ABSTRACT_NAMESPACE_ATTR_NODE_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_ABSTRACT_NAMESPACE_ATTR_NODE_LIST))
#define GXML_IS_ABSTRACT_NAMESPACE_ATTR_NODE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_ABSTRACT_NAMESPACE_ATTR_NODE_LIST))
#define GXML_ABSTRACT_NAMESPACE_ATTR_NODE_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_ABSTRACT_NAMESPACE_ATTR_NODE_LIST, GXmlAbstractNamespaceAttrNodeListClass))

typedef struct _GXmlAbstractNamespaceAttrNodeList GXmlAbstractNamespaceAttrNodeList;
typedef struct _GXmlAbstractNamespaceAttrNodeListClass GXmlAbstractNamespaceAttrNodeListClass;

#define GXML_TYPE_NAMESPACE_ATTR_NODE_LIST (gxml_namespace_attr_node_list_get_type ())
#define GXML_NAMESPACE_ATTR_NODE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_NAMESPACE_ATTR_NODE_LIST, GXmlNamespaceAttrNodeList))
#define GXML_NAMESPACE_ATTR_NODE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_NAMESPACE_ATTR_NODE_LIST, GXmlNamespaceAttrNodeListClass))
#define GXML_IS_NAMESPACE_ATTR_NODE_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_NAMESPACE_ATTR_NODE_LIST))
#define GXML_IS_NAMESPACE_ATTR_NODE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_NAMESPACE_ATTR_NODE_LIST))
#define GXML_NAMESPACE_ATTR_NODE_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_NAMESPACE_ATTR_NODE_LIST, GXmlNamespaceAttrNodeListClass))

typedef struct _GXmlNamespaceAttrNodeList GXmlNamespaceAttrNodeList;
typedef struct _GXmlNamespaceAttrNodeListClass GXmlNamespaceAttrNodeListClass;

#define GXML_TYPE_BACKED_NODE (gxml_backed_node_get_type ())
#define GXML_BACKED_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_BACKED_NODE, GXmlBackedNode))
#define GXML_BACKED_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_BACKED_NODE, GXmlBackedNodeClass))
#define GXML_IS_BACKED_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_BACKED_NODE))
#define GXML_IS_BACKED_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_BACKED_NODE))
#define GXML_BACKED_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_BACKED_NODE, GXmlBackedNodeClass))

typedef struct _GXmlBackedNode GXmlBackedNode;
typedef struct _GXmlBackedNodeClass GXmlBackedNodeClass;
typedef struct _GXmlBackedNodePrivate GXmlBackedNodePrivate;

#define GXML_TYPE_ATTRIBUTE (gxml_attribute_get_type ())
#define GXML_ATTRIBUTE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_ATTRIBUTE, GXmlAttribute))
#define GXML_IS_ATTRIBUTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_ATTRIBUTE))
#define GXML_ATTRIBUTE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_ATTRIBUTE, GXmlAttributeIface))

typedef struct _GXmlAttribute GXmlAttribute;
typedef struct _GXmlAttributeIface GXmlAttributeIface;

#define GXML_TYPE_XATTR (gxml_xattr_get_type ())
#define GXML_XATTR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_XATTR, GXmlxAttr))
#define GXML_XATTR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_XATTR, GXmlxAttrClass))
#define GXML_IS_XATTR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_XATTR))
#define GXML_IS_XATTR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_XATTR))
#define GXML_XATTR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_XATTR, GXmlxAttrClass))

typedef struct _GXmlxAttr GXmlxAttr;
typedef struct _GXmlxAttrClass GXmlxAttrClass;
typedef struct _GXmlxAttrPrivate GXmlxAttrPrivate;

#define GXML_TYPE_CHILD_NODE_LIST (gxml_child_node_list_get_type ())
#define GXML_CHILD_NODE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_CHILD_NODE_LIST, GXmlChildNodeList))
#define GXML_CHILD_NODE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_CHILD_NODE_LIST, GXmlChildNodeListClass))
#define GXML_IS_CHILD_NODE_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_CHILD_NODE_LIST))
#define GXML_IS_CHILD_NODE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_CHILD_NODE_LIST))
#define GXML_CHILD_NODE_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_CHILD_NODE_LIST, GXmlChildNodeListClass))

typedef struct _GXmlChildNodeList GXmlChildNodeList;
typedef struct _GXmlChildNodeListClass GXmlChildNodeListClass;

#define GXML_TYPE_ATTR_CHILD_NODE_LIST (gxml_attr_child_node_list_get_type ())
#define GXML_ATTR_CHILD_NODE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_ATTR_CHILD_NODE_LIST, GXmlAttrChildNodeList))
#define GXML_ATTR_CHILD_NODE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_ATTR_CHILD_NODE_LIST, GXmlAttrChildNodeListClass))
#define GXML_IS_ATTR_CHILD_NODE_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_ATTR_CHILD_NODE_LIST))
#define GXML_IS_ATTR_CHILD_NODE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_ATTR_CHILD_NODE_LIST))
#define GXML_ATTR_CHILD_NODE_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_ATTR_CHILD_NODE_LIST, GXmlAttrChildNodeListClass))

typedef struct _GXmlAttrChildNodeList GXmlAttrChildNodeList;
typedef struct _GXmlAttrChildNodeListClass GXmlAttrChildNodeListClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define GXML_TYPE_XDOCUMENT (gxml_xdocument_get_type ())
#define GXML_XDOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_XDOCUMENT, GXmlxDocument))
#define GXML_XDOCUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_XDOCUMENT, GXmlxDocumentClass))
#define GXML_IS_XDOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_XDOCUMENT))
#define GXML_IS_XDOCUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_XDOCUMENT))
#define GXML_XDOCUMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_XDOCUMENT, GXmlxDocumentClass))

typedef struct _GXmlxDocument GXmlxDocument;
typedef struct _GXmlxDocumentClass GXmlxDocumentClass;

#define GXML_TYPE_XCHARACTER_DATA (gxml_xcharacter_data_get_type ())
#define GXML_XCHARACTER_DATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_XCHARACTER_DATA, GXmlxCharacterData))
#define GXML_XCHARACTER_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_XCHARACTER_DATA, GXmlxCharacterDataClass))
#define GXML_IS_XCHARACTER_DATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_XCHARACTER_DATA))
#define GXML_IS_XCHARACTER_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_XCHARACTER_DATA))
#define GXML_XCHARACTER_DATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_XCHARACTER_DATA, GXmlxCharacterDataClass))

typedef struct _GXmlxCharacterData GXmlxCharacterData;
typedef struct _GXmlxCharacterDataClass GXmlxCharacterDataClass;

#define GXML_TYPE_XTEXT (gxml_xtext_get_type ())
#define GXML_XTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_XTEXT, GXmlxText))
#define GXML_XTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_XTEXT, GXmlxTextClass))
#define GXML_IS_XTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_XTEXT))
#define GXML_IS_XTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_XTEXT))
#define GXML_XTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_XTEXT, GXmlxTextClass))

typedef struct _GXmlxText GXmlxText;
typedef struct _GXmlxTextClass GXmlxTextClass;

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 _GXmlxNodeListIface {
	GTypeInterface parent_iface;
	GXmlxNode* (*item) (GXmlxNodeList* self, gulong idx);
	GXmlxNode* (*insert_before) (GXmlxNodeList* self, GXmlxNode* new_child, GXmlxNode* ref_child);
	GXmlxNode* (*replace_child) (GXmlxNodeList* self, GXmlxNode* new_child, GXmlxNode* old_child);
	GXmlxNode* (*remove_child) (GXmlxNodeList* self, GXmlxNode* old_child);
	GXmlxNode* (*append_child) (GXmlxNodeList* self, GXmlxNode* new_child);
	gchar* (*to_string) (GXmlxNodeList* self, gboolean in_line);
	GXmlxNode* (*first) (GXmlxNodeList* self);
	GXmlxNode* (*last) (GXmlxNodeList* self);
	GXmlxNode* (*get) (GXmlxNodeList* self, gint n);
	gulong (*get_length) (GXmlxNodeList* self);
	void (*set_length) (GXmlxNodeList* self, gulong value);
};

struct _GXmlxNode {
	GObject parent_instance;
	GXmlxNodePrivate * priv;
	GXmlxNodeList* _child_nodes;
	GXmlNamedAttrMap* _attributes;
	GXmlNamespaceAttrNodeList* _namespace_definitions;
};

struct _GXmlxNodeClass {
	GObjectClass parent_class;
	GXmlNamespaceAttr* (*add_namespace_attr) (GXmlxNode* self, const gchar* uri, const gchar* namespace_prefix);
	gboolean (*set_namespace) (GXmlxNode* self, const gchar* uri, const gchar* namespace_prefix);
	GXmlxNode* (*insert_before) (GXmlxNode* self, GXmlxNode* new_child, GXmlxNode* ref_child);
	GXmlxNode* (*replace_child) (GXmlxNode* self, GXmlxNode* new_child, GXmlxNode* old_child);
	GXmlxNode* (*remove_child) (GXmlxNode* self, GXmlxNode* old_child);
	GXmlxNode* (*append_child) (GXmlxNode* self, GXmlxNode* new_child);
	gboolean (*has_child_nodes) (GXmlxNode* self);
	GXmlxNode* (*clone_node) (GXmlxNode* self, gboolean deep);
	gchar* (*stringify) (GXmlxNode* self, gboolean format, gint level);
	gchar* (*to_string) (GXmlxNode* self);
	GeeList* (*get_namespace_definitions) (GXmlxNode* self);
	void (*set_namespace_definitions) (GXmlxNode* self, GeeList* value);
	const gchar* (*get_namespace_uri) (GXmlxNode* self);
	void (*set_namespace_uri) (GXmlxNode* self, const gchar* value);
	const gchar* (*get_namespace_prefix) (GXmlxNode* self);
	void (*set_namespace_prefix) (GXmlxNode* self, const gchar* value);
	const gchar* (*get_local_name) (GXmlxNode* self);
	void (*set_local_name) (GXmlxNode* self, const gchar* value);
	const gchar* (*get_node_name) (GXmlxNode* self);
	void (*set_node_name) (GXmlxNode* self, const gchar* value);
	const gchar* (*get_node_value) (GXmlxNode* self);
	void (*set_node_value) (GXmlxNode* self, const gchar* value);
	GXmlNodeType (*get_node_type) (GXmlxNode* self);
	void (*set_node_type) (GXmlxNode* self, GXmlNodeType value);
	GXmlxNode* (*get_parent_node) (GXmlxNode* self);
	void (*set_parent_node) (GXmlxNode* self, GXmlxNode* value);
	GXmlxNodeList* (*get_child_nodes) (GXmlxNode* self);
	void (*set_child_nodes) (GXmlxNode* self, GXmlxNodeList* value);
	GXmlxNode* (*get_first_child) (GXmlxNode* self);
	void (*set_first_child) (GXmlxNode* self, GXmlxNode* value);
	GXmlxNode* (*get_last_child) (GXmlxNode* self);
	void (*set_last_child) (GXmlxNode* self, GXmlxNode* value);
	GXmlxNode* (*get_previous_sibling) (GXmlxNode* self);
	void (*set_previous_sibling) (GXmlxNode* self, GXmlxNode* value);
	GXmlxNode* (*get_next_sibling) (GXmlxNode* self);
	void (*set_next_sibling) (GXmlxNode* self, GXmlxNode* value);
	GXmlNamedAttrMap* (*get_attributes) (GXmlxNode* self);
	void (*set_attributes) (GXmlxNode* self, GXmlNamedAttrMap* value);
	GeeList* (*get_namespaces) (GXmlxNode* self);
	GeeBidirList* (*get_children) (GXmlxNode* self);
	GeeMap* (*get_attrs) (GXmlxNode* self);
	gchar* (*get_name) (GXmlxNode* self);
	gchar* (*get_value) (GXmlxNode* self);
	void (*set_value) (GXmlxNode* self, const gchar* value);
	GXmlNode* (*get_parent) (GXmlxNode* self);
};

struct _GXmlBackedNode {
	GXmlxNode parent_instance;
	GXmlBackedNodePrivate * priv;
	xmlNode* node;
};

struct _GXmlBackedNodeClass {
	GXmlxNodeClass parent_class;
};

struct _GXmlAttributeIface {
	GTypeInterface parent_iface;
	GXmlNamespace* (*get_namespace) (GXmlAttribute* self);
	void (*set_namespace) (GXmlAttribute* self, GXmlNamespace* value);
	gchar* (*get_prefix) (GXmlAttribute* self);
};

struct _GXmlxAttr {
	GXmlBackedNode parent_instance;
	GXmlxAttrPrivate * priv;
	xmlAttr* node;
	GXmlAttrChildNodeList* _attr_list;
};

struct _GXmlxAttrClass {
	GXmlBackedNodeClass parent_class;
};

struct _GXmlxAttrPrivate {
	gchar* _node_value;
	gboolean _specified;
};


static gpointer gxml_xattr_parent_class = NULL;
static GXmlAttributeIface* gxml_xattr_gxml_attribute_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_xnode_get_type (void) G_GNUC_CONST;
GType gxml_namespace_attr_get_type (void) G_GNUC_CONST;
GType gxml_xnode_list_get_type (void) G_GNUC_CONST;
GType gxml_abstract_named_attr_map_get_type (void) G_GNUC_CONST;
GType gxml_named_attr_map_get_type (void) G_GNUC_CONST;
GType gxml_abstract_namespace_attr_node_list_get_type (void) G_GNUC_CONST;
GType gxml_namespace_attr_node_list_get_type (void) G_GNUC_CONST;
GType gxml_backed_node_get_type (void) G_GNUC_CONST;
GType gxml_attribute_get_type (void) G_GNUC_CONST;
GType gxml_xattr_get_type (void) G_GNUC_CONST;
GType gxml_child_node_list_get_type (void) G_GNUC_CONST;
GType gxml_attr_child_node_list_get_type (void) G_GNUC_CONST;
#define GXML_XATTR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GXML_TYPE_XATTR, GXmlxAttrPrivate))
enum  {
	GXML_XATTR_DUMMY_PROPERTY,
	GXML_XATTR_NODE_VALUE,
	GXML_XATTR_PARENT_NODE,
	GXML_XATTR_PREVIOUS_SIBLING,
	GXML_XATTR_NEXT_SIBLING,
	GXML_XATTR_CHILD_NODES,
	GXML_XATTR_NAME,
	GXML_XATTR_SPECIFIED,
	GXML_XATTR_VALUE,
	GXML_XATTR_PREFIX,
	GXML_XATTR_NAMESPACE
};
GType gxml_xdocument_get_type (void) G_GNUC_CONST;
GXmlxAttr* gxml_xattr_new (xmlAttr* node, GXmlxDocument* doc);
GXmlxAttr* gxml_xattr_construct (GType object_type, xmlAttr* node, GXmlxDocument* doc);
GXmlBackedNode* gxml_backed_node_new (xmlNode* node, GXmlxDocument* owner);
GXmlBackedNode* gxml_backed_node_construct (GType object_type, xmlNode* node, GXmlxDocument* owner);
static void gxml_xattr_set_specified (GXmlxAttr* self, gboolean value);
GXmlxDocument* gxml_xnode_get_owner_document (GXmlxNode* self);
GXmlAttrChildNodeList* gxml_attr_child_node_list_new (xmlAttr* parent, GXmlxDocument* owner);
GXmlAttrChildNodeList* gxml_attr_child_node_list_construct (GType object_type, xmlAttr* parent, GXmlxDocument* owner);
static gchar* gxml_xattr_real_stringify (GXmlxNode* base, gboolean format, gint level);
gchar* gxml_xnode_get_name (GXmlxNode* self);
gchar* gxml_xnode_get_value (GXmlxNode* self);
GXmlxNodeList* gxml_xnode_get_child_nodes (GXmlxNode* self);
GXmlxNode* gxml_xnode_list_get (GXmlxNodeList* self, gint n);
const gchar* gxml_xnode_get_node_value (GXmlxNode* self);
GXmlxNode* gxml_xnode_remove_child (GXmlxNode* self, GXmlxNode* old_child);
GXmlxNode* gxml_xnode_append_child (GXmlxNode* self, GXmlxNode* new_child);
GType gxml_xcharacter_data_get_type (void) G_GNUC_CONST;
GType gxml_xtext_get_type (void) G_GNUC_CONST;
GXmlxText* gxml_xdocument_create_text_node (GXmlxDocument* self, const gchar* text_data);
const gchar* gxml_xnode_get_node_name (GXmlxNode* self);
gboolean gxml_xattr_get_specified (GXmlxAttr* self);
void gxml_xnode_set_node_value (GXmlxNode* self, const gchar* value);
GXmlNamespaceAttr* gxml_namespace_attr_new (xmlNs* ns, GXmlxDocument* doc);
GXmlNamespaceAttr* gxml_namespace_attr_construct (GType object_type, xmlNs* ns, GXmlxDocument* doc);
gchar* gxml_namespace_get_uri (GXmlNamespace* self);
gchar* gxml_namespace_get_prefix (GXmlNamespace* self);
static void gxml_xattr_finalize (GObject* obj);
GXmlxNode* gxml_xnode_get_parent_node (GXmlxNode* self);
GXmlxNode* gxml_xnode_get_previous_sibling (GXmlxNode* self);
GXmlxNode* gxml_xnode_get_next_sibling (GXmlxNode* self);
gchar* gxml_attribute_get_prefix (GXmlAttribute* self);
GXmlNamespace* gxml_attribute_get_namespace (GXmlAttribute* self);
static void _vala_gxml_xattr_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
void gxml_xnode_set_parent_node (GXmlxNode* self, GXmlxNode* value);
void gxml_xnode_set_previous_sibling (GXmlxNode* self, GXmlxNode* value);
void gxml_xnode_set_next_sibling (GXmlxNode* self, GXmlxNode* value);
void gxml_xnode_set_child_nodes (GXmlxNode* self, GXmlxNodeList* value);
void gxml_xnode_set_value (GXmlxNode* self, const gchar* value);
void gxml_attribute_set_namespace (GXmlAttribute* self, GXmlNamespace* value);
static void _vala_gxml_xattr_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


/** Constructors */
GXmlxAttr* gxml_xattr_construct (GType object_type, xmlAttr* node, GXmlxDocument* doc) {
	GXmlxAttr * self = NULL;
	xmlAttr* _tmp0_ = NULL;
	GXmlxDocument* _tmp1_ = NULL;
	xmlAttr* _tmp2_ = NULL;
	xmlAttr* _tmp3_ = NULL;
	GXmlxDocument* _tmp4_ = NULL;
	GXmlxDocument* _tmp5_ = NULL;
	GXmlAttrChildNodeList* _tmp6_ = NULL;
	g_return_val_if_fail (doc != NULL, NULL);
	_tmp0_ = node;
	_tmp1_ = doc;
	self = (GXmlxAttr*) gxml_backed_node_construct (object_type, (xmlNode*) _tmp0_, _tmp1_);
	_tmp2_ = node;
	self->node = _tmp2_;
	gxml_xattr_set_specified (self, TRUE);
	_tmp3_ = self->node;
	_tmp4_ = gxml_xnode_get_owner_document ((GXmlxNode*) self);
	_tmp5_ = _tmp4_;
	_tmp6_ = gxml_attr_child_node_list_new (_tmp3_, _tmp5_);
	_g_object_unref0 (self->_attr_list);
	self->_attr_list = _tmp6_;
	return self;
}


GXmlxAttr* gxml_xattr_new (xmlAttr* node, GXmlxDocument* doc) {
	return gxml_xattr_construct (GXML_TYPE_XATTR, node, doc);
}


/**
 * {@inheritDoc}
 */
static gchar* gxml_xattr_real_stringify (GXmlxNode* base, gboolean format, gint level) {
	GXmlxAttr * self;
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	self = (GXmlxAttr*) base;
	_tmp0_ = gxml_xnode_get_name ((GXmlxNode*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp3_ = gxml_xnode_get_value ((GXmlxNode*) self);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strdup_printf ("Attr(%s=\"%s\")", _tmp2_, _tmp5_);
	_tmp7_ = _tmp6_;
	_g_free0 (_tmp5_);
	_g_free0 (_tmp2_);
	result = _tmp7_;
	return result;
}


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


static const gchar* gxml_xattr_real_get_node_value (GXmlxNode* base) {
	const gchar* result;
	GXmlxAttr* self;
	gchar* _tmp0_ = NULL;
	const gchar* _tmp18_ = NULL;
	self = (GXmlxAttr*) base;
	_tmp0_ = g_strdup ("");
	_g_free0 (self->priv->_node_value);
	self->priv->_node_value = _tmp0_;
	{
		GXmlxNodeList* _child_list = NULL;
		GXmlxNodeList* _tmp1_ = NULL;
		GXmlxNodeList* _tmp2_ = NULL;
		GXmlxNodeList* _tmp3_ = NULL;
		gint _child_size = 0;
		GXmlxNodeList* _tmp4_ = NULL;
		gint _tmp5_ = 0;
		gint _tmp6_ = 0;
		gint _child_index = 0;
		_tmp1_ = gxml_xnode_get_child_nodes ((GXmlxNode*) self);
		_tmp2_ = _tmp1_;
		_tmp3_ = _g_object_ref0 (_tmp2_);
		_child_list = _tmp3_;
		_tmp4_ = _child_list;
		_tmp5_ = gee_collection_get_size ((GeeCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_child_size = _tmp6_;
		_child_index = -1;
		while (TRUE) {
			gint _tmp7_ = 0;
			gint _tmp8_ = 0;
			gint _tmp9_ = 0;
			GXmlxNode* child = NULL;
			GXmlxNodeList* _tmp10_ = NULL;
			gint _tmp11_ = 0;
			GXmlxNode* _tmp12_ = NULL;
			const gchar* _tmp13_ = NULL;
			GXmlxNode* _tmp14_ = NULL;
			const gchar* _tmp15_ = NULL;
			const gchar* _tmp16_ = NULL;
			gchar* _tmp17_ = NULL;
			_tmp7_ = _child_index;
			_child_index = _tmp7_ + 1;
			_tmp8_ = _child_index;
			_tmp9_ = _child_size;
			if (!(_tmp8_ < _tmp9_)) {
				break;
			}
			_tmp10_ = _child_list;
			_tmp11_ = _child_index;
			_tmp12_ = gxml_xnode_list_get (_tmp10_, _tmp11_);
			child = _tmp12_;
			_tmp13_ = self->priv->_node_value;
			_tmp14_ = child;
			_tmp15_ = gxml_xnode_get_node_value (_tmp14_);
			_tmp16_ = _tmp15_;
			_tmp17_ = g_strconcat (_tmp13_, _tmp16_, NULL);
			_g_free0 (self->priv->_node_value);
			self->priv->_node_value = _tmp17_;
			_g_object_unref0 (child);
		}
		_g_object_unref0 (_child_list);
	}
	_tmp18_ = self->priv->_node_value;
	result = _tmp18_;
	return result;
}


static void gxml_xattr_real_set_node_value (GXmlxNode* base, const gchar* value) {
	GXmlxAttr* self;
	GXmlxDocument* _tmp13_ = NULL;
	GXmlxDocument* _tmp14_ = NULL;
	const gchar* _tmp15_ = NULL;
	GXmlxText* _tmp16_ = NULL;
	self = (GXmlxAttr*) base;
	{
		GXmlxNodeList* _child_list = NULL;
		GXmlxNodeList* _tmp0_ = NULL;
		GXmlxNodeList* _tmp1_ = NULL;
		GXmlxNodeList* _tmp2_ = NULL;
		gint _child_size = 0;
		GXmlxNodeList* _tmp3_ = NULL;
		gint _tmp4_ = 0;
		gint _tmp5_ = 0;
		gint _child_index = 0;
		_tmp0_ = gxml_xnode_get_child_nodes ((GXmlxNode*) self);
		_tmp1_ = _tmp0_;
		_tmp2_ = _g_object_ref0 (_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_ = 0;
			gint _tmp7_ = 0;
			gint _tmp8_ = 0;
			GXmlxNode* child = NULL;
			GXmlxNodeList* _tmp9_ = NULL;
			gint _tmp10_ = 0;
			GXmlxNode* _tmp11_ = NULL;
			GXmlxNode* _tmp12_ = NULL;
			_tmp6_ = _child_index;
			_child_index = _tmp6_ + 1;
			_tmp7_ = _child_index;
			_tmp8_ = _child_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _child_list;
			_tmp10_ = _child_index;
			_tmp11_ = gxml_xnode_list_get (_tmp9_, _tmp10_);
			child = _tmp11_;
			_tmp12_ = child;
			gxml_xnode_remove_child ((GXmlxNode*) self, _tmp12_);
			_g_object_unref0 (child);
		}
		_g_object_unref0 (_child_list);
	}
	_tmp13_ = gxml_xnode_get_owner_document ((GXmlxNode*) self);
	_tmp14_ = _tmp13_;
	_tmp15_ = value;
	_tmp16_ = gxml_xdocument_create_text_node (_tmp14_, _tmp15_);
	gxml_xnode_append_child ((GXmlxNode*) self, (GXmlxNode*) _tmp16_);
	g_object_notify ((GObject *) self, "node-value");
}


static GXmlxNode* gxml_xattr_real_get_parent_node (GXmlxNode* base) {
	GXmlxNode* result;
	GXmlxAttr* self;
	self = (GXmlxAttr*) base;
	result = NULL;
	return result;
}


static void gxml_xattr_real_set_parent_node (GXmlxNode* base, GXmlxNode* value) {
	GXmlxAttr* self;
	self = (GXmlxAttr*) base;
	g_object_notify ((GObject *) self, "parent-node");
}


static GXmlxNode* gxml_xattr_real_get_previous_sibling (GXmlxNode* base) {
	GXmlxNode* result;
	GXmlxAttr* self;
	self = (GXmlxAttr*) base;
	result = NULL;
	return result;
}


static void gxml_xattr_real_set_previous_sibling (GXmlxNode* base, GXmlxNode* value) {
	GXmlxAttr* self;
	self = (GXmlxAttr*) base;
	g_object_notify ((GObject *) self, "previous-sibling");
}


static GXmlxNode* gxml_xattr_real_get_next_sibling (GXmlxNode* base) {
	GXmlxNode* result;
	GXmlxAttr* self;
	self = (GXmlxAttr*) base;
	result = NULL;
	return result;
}


static void gxml_xattr_real_set_next_sibling (GXmlxNode* base, GXmlxNode* value) {
	GXmlxAttr* self;
	self = (GXmlxAttr*) base;
	g_object_notify ((GObject *) self, "next-sibling");
}


static GXmlxNodeList* gxml_xattr_real_get_child_nodes (GXmlxNode* base) {
	GXmlxNodeList* result;
	GXmlxAttr* self;
	GXmlAttrChildNodeList* _tmp0_ = NULL;
	self = (GXmlxAttr*) base;
	_tmp0_ = self->_attr_list;
	result = (GXmlxNodeList*) _tmp0_;
	return result;
}


static void gxml_xattr_real_set_child_nodes (GXmlxNode* base, GXmlxNodeList* value) {
	GXmlxAttr* self;
	self = (GXmlxAttr*) base;
	g_object_notify ((GObject *) self, "child-nodes");
}


static gchar* gxml_xattr_real_get_name (GXmlxNode* base) {
	gchar* result;
	GXmlxAttr* self;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	self = (GXmlxAttr*) base;
	_tmp0_ = gxml_xnode_get_node_name ((GXmlxNode*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup (_tmp1_);
	result = _tmp2_;
	return result;
}


gboolean gxml_xattr_get_specified (GXmlxAttr* self) {
	gboolean result;
	gboolean _tmp0_ = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_specified;
	result = _tmp0_;
	return result;
}


static void gxml_xattr_set_specified (GXmlxAttr* self, gboolean value) {
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_specified = _tmp0_;
	g_object_notify ((GObject *) self, "specified");
}


static gchar* gxml_xattr_real_get_value (GXmlxNode* base) {
	gchar* result;
	GXmlxAttr* self;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	self = (GXmlxAttr*) base;
	_tmp0_ = gxml_xnode_get_node_value ((GXmlxNode*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup (_tmp1_);
	result = _tmp2_;
	return result;
}


static void gxml_xattr_real_set_value (GXmlxNode* base, const gchar* value) {
	GXmlxAttr* self;
	const gchar* _tmp0_ = NULL;
	self = (GXmlxAttr*) base;
	_tmp0_ = value;
	gxml_xnode_set_node_value ((GXmlxNode*) self, _tmp0_);
	g_object_notify ((GObject *) self, "value");
}


static gchar* gxml_xattr_real_get_prefix (GXmlAttribute* base) {
	gchar* result;
	GXmlxAttr* self;
	xmlAttr* _tmp0_ = NULL;
	xmlAttr* _tmp2_ = NULL;
	xmlNs* _tmp3_ = NULL;
	xmlAttr* _tmp5_ = NULL;
	xmlNs* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	self = (GXmlxAttr*) base;
	_tmp0_ = self->node;
	if (_tmp0_ == NULL) {
		gchar* _tmp1_ = NULL;
		_tmp1_ = g_strdup ("");
		result = _tmp1_;
		return result;
	}
	_tmp2_ = self->node;
	_tmp3_ = _tmp2_->ns;
	if (_tmp3_ == NULL) {
		gchar* _tmp4_ = NULL;
		_tmp4_ = g_strdup ("");
		result = _tmp4_;
		return result;
	}
	_tmp5_ = self->node;
	_tmp6_ = _tmp5_->ns;
	_tmp7_ = _tmp6_->prefix;
	_tmp8_ = g_strdup (_tmp7_);
	result = _tmp8_;
	return result;
}


static GXmlNamespace* gxml_xattr_real_get_namespace (GXmlAttribute* base) {
	GXmlNamespace* result;
	GXmlxAttr* self;
	xmlAttr* _tmp0_ = NULL;
	xmlNs* _tmp1_ = NULL;
	GXmlxDocument* _tmp2_ = NULL;
	GXmlxDocument* _tmp3_ = NULL;
	GXmlNamespaceAttr* _tmp4_ = NULL;
	self = (GXmlxAttr*) base;
	_tmp0_ = self->node;
	_tmp1_ = _tmp0_->ns;
	_tmp2_ = gxml_xnode_get_owner_document ((GXmlxNode*) self);
	_tmp3_ = _tmp2_;
	_tmp4_ = gxml_namespace_attr_new (_tmp1_, _tmp3_);
	result = (GXmlNamespace*) _tmp4_;
	return result;
}


static void gxml_xattr_real_set_namespace (GXmlAttribute* base, GXmlNamespace* value) {
	GXmlxAttr* self;
	xmlAttr* _tmp0_ = NULL;
	xmlAttr* _tmp1_ = NULL;
	xmlDoc* _tmp2_ = NULL;
	xmlAttr* _tmp3_ = NULL;
	xmlNode* _tmp4_ = NULL;
	xmlNs* ns = NULL;
	xmlAttr* _tmp5_ = NULL;
	xmlNode* _tmp6_ = NULL;
	GXmlNamespace* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
	GXmlNamespace* _tmp11_ = NULL;
	gchar* _tmp12_ = NULL;
	gchar* _tmp13_ = NULL;
	gchar* _tmp14_ = NULL;
	xmlNs* _tmp15_ = NULL;
	xmlNs* _tmp16_ = NULL;
	xmlAttr* _tmp17_ = NULL;
	xmlNs* _tmp18_ = NULL;
	self = (GXmlxAttr*) base;
	_tmp0_ = self->node;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->node;
	_tmp2_ = _tmp1_->doc;
	if (_tmp2_ == NULL) {
		return;
	}
	_tmp3_ = self->node;
	_tmp4_ = _tmp3_->parent;
	if (_tmp4_ == NULL) {
		return;
	}
	_tmp5_ = self->node;
	_tmp6_ = _tmp5_->parent;
	_tmp7_ = value;
	_tmp8_ = gxml_namespace_get_uri (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = _tmp9_;
	_tmp11_ = value;
	_tmp12_ = gxml_namespace_get_prefix (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = _tmp13_;
	_tmp15_ = xmlNewNs (_tmp6_, (xmlChar*) _tmp10_, (xmlChar*) _tmp14_);
	_tmp16_ = _tmp15_;
	_g_free0 (_tmp14_);
	_g_free0 (_tmp10_);
	ns = _tmp16_;
	_tmp17_ = self->node;
	_tmp18_ = ns;
	_tmp17_->ns = _tmp18_;
	g_object_notify ((GObject *) self, "namespace");
}


static void gxml_xattr_class_init (GXmlxAttrClass * klass) {
	gxml_xattr_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GXmlxAttrPrivate));
	((GXmlxNodeClass *) klass)->stringify = gxml_xattr_real_stringify;
	GXML_XNODE_CLASS (klass)->get_node_value = gxml_xattr_real_get_node_value;
	GXML_XNODE_CLASS (klass)->set_node_value = gxml_xattr_real_set_node_value;
	GXML_XNODE_CLASS (klass)->get_parent_node = gxml_xattr_real_get_parent_node;
	GXML_XNODE_CLASS (klass)->set_parent_node = gxml_xattr_real_set_parent_node;
	GXML_XNODE_CLASS (klass)->get_previous_sibling = gxml_xattr_real_get_previous_sibling;
	GXML_XNODE_CLASS (klass)->set_previous_sibling = gxml_xattr_real_set_previous_sibling;
	GXML_XNODE_CLASS (klass)->get_next_sibling = gxml_xattr_real_get_next_sibling;
	GXML_XNODE_CLASS (klass)->set_next_sibling = gxml_xattr_real_set_next_sibling;
	GXML_XNODE_CLASS (klass)->get_child_nodes = gxml_xattr_real_get_child_nodes;
	GXML_XNODE_CLASS (klass)->set_child_nodes = gxml_xattr_real_set_child_nodes;
	GXML_XNODE_CLASS (klass)->get_name = gxml_xattr_real_get_name;
	GXML_XNODE_CLASS (klass)->get_value = gxml_xattr_real_get_value;
	GXML_XNODE_CLASS (klass)->set_value = gxml_xattr_real_set_value;
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_xattr_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gxml_xattr_set_property;
	G_OBJECT_CLASS (klass)->finalize = gxml_xattr_finalize;
	/**
	 * The node_value for an attribute is a string
	 * representing the contents of the Attr's tree of
	 * children.
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_XATTR_NODE_VALUE, g_param_spec_string ("node-value", "node-value", "node-value", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	 * {@inheritDoc}
	 *
	 * Note: In libxml2, xmlAttrs have parent nodes, which are the Elements that
	 * contain them.  In the W3C DOM, they specifically don't.
	 *
	 * URL: [[http://www.w3.org/2003/01/dom2-javadoc/org/w3c/dom/Attr.html]]
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_XATTR_PARENT_NODE, g_param_spec_object ("parent-node", "parent-node", "parent-node", GXML_TYPE_XNODE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	 * {@inheritDoc}
	 *
	 * Note: In libxml2, xmlAttrs have siblings, which are other Attrs contained
	 * by the same Element.  In the W3C DOM, they specifically don't.
	 *
	 * URL: [[http://www.w3.org/2003/01/dom2-javadoc/org/w3c/dom/Attr.html]]
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_XATTR_PREVIOUS_SIBLING, g_param_spec_object ("previous-sibling", "previous-sibling", "previous-sibling", GXML_TYPE_XNODE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	 * {@inheritDoc}
	 *
	 * Note: In libxml2, xmlAttrs have siblings, which are other Attrs contained
	 * by the same Element.  In the W3C DOM, they specifically don't.
	 *
	 * URL: [[http://www.w3.org/2003/01/dom2-javadoc/org/w3c/dom/Attr.html]]
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_XATTR_NEXT_SIBLING, g_param_spec_object ("next-sibling", "next-sibling", "next-sibling", GXML_TYPE_XNODE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	 * {@inheritDoc}
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_XATTR_CHILD_NODES, g_param_spec_object ("child-nodes", "child-nodes", "child-nodes", GXML_TYPE_XNODE_LIST, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/**
	 * The name of the attribute's name=value pair.
	 *
	 * Version: DOM Level 1 Core<<BR>>
	 * URL: [[http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-1112119403]]
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_XATTR_NAME, g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	 * Whether an Attr was explicitly set in the
	 * underlying document. If the attribute is changed,
	 * it is set to false.
	 *
	 * Version: DOM Level 1 Core<<BR>>
	 * URL: [[http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-862529273]]
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_XATTR_SPECIFIED, g_param_spec_boolean ("specified", "specified", "specified", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	 * Value of the Attr. This is the same as node_value.
	 * It is a stringified version of the value, which can
	 * also be accessed as a tree node structure of
	 * child_nodes.
	 *
	 * Version: DOM Level 1 Core<<BR>>
	 * URL: [[http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-221662474]]
	 */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_XATTR_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));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_XATTR_PREFIX, g_param_spec_string ("prefix", "prefix", "prefix", 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_XATTR_NAMESPACE, g_param_spec_object ("namespace", "namespace", "namespace", GXML_TYPE_NAMESPACE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void gxml_xattr_gxml_attribute_interface_init (GXmlAttributeIface * iface) {
	gxml_xattr_gxml_attribute_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_prefix = gxml_xattr_real_get_prefix;
	iface->get_namespace = gxml_xattr_real_get_namespace;
	iface->set_namespace = gxml_xattr_real_set_namespace;
}


static void gxml_xattr_instance_init (GXmlxAttr * self) {
	self->priv = GXML_XATTR_GET_PRIVATE (self);
}


static void gxml_xattr_finalize (GObject* obj) {
	GXmlxAttr * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_XATTR, GXmlxAttr);
	_g_object_unref0 (self->_attr_list);
	_g_free0 (self->priv->_node_value);
	G_OBJECT_CLASS (gxml_xattr_parent_class)->finalize (obj);
}


/**
 * An XML Attr node, which represents a name="value" pair.
 *
 * These represent name="value" attributes associated with XML Elements
 * (see {@link GXml.Element}). Values are often represented as strings but can
 * also be more complex subtrees for some nodes.
 *
 * To create one, use {@link GXml.xDocument.create_attribute}.
 *
 * XML Example: Here, we have an Attr with the name 'flavour'
 * and the value 'pumpkin'. {{{<pie flavour="pumpkin" />}}}
 *
 * Version: DOM Level 1 Core<<BR>>
 *
 * URL: [[http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-637646024]]
 *
 * @see GXml.Node
 */
GType gxml_xattr_get_type (void) {
	static volatile gsize gxml_xattr_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_xattr_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlxAttrClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_xattr_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlxAttr), 0, (GInstanceInitFunc) gxml_xattr_instance_init, NULL };
		static const GInterfaceInfo gxml_attribute_info = { (GInterfaceInitFunc) gxml_xattr_gxml_attribute_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType gxml_xattr_type_id;
		gxml_xattr_type_id = g_type_register_static (GXML_TYPE_BACKED_NODE, "GXmlxAttr", &g_define_type_info, 0);
		g_type_add_interface_static (gxml_xattr_type_id, GXML_TYPE_ATTRIBUTE, &gxml_attribute_info);
		g_once_init_leave (&gxml_xattr_type_id__volatile, gxml_xattr_type_id);
	}
	return gxml_xattr_type_id__volatile;
}


static void _vala_gxml_xattr_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GXmlxAttr * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_XATTR, GXmlxAttr);
	switch (property_id) {
		case GXML_XATTR_NODE_VALUE:
		g_value_set_string (value, gxml_xnode_get_node_value ((GXmlxNode*) self));
		break;
		case GXML_XATTR_PARENT_NODE:
		g_value_set_object (value, gxml_xnode_get_parent_node ((GXmlxNode*) self));
		break;
		case GXML_XATTR_PREVIOUS_SIBLING:
		g_value_set_object (value, gxml_xnode_get_previous_sibling ((GXmlxNode*) self));
		break;
		case GXML_XATTR_NEXT_SIBLING:
		g_value_set_object (value, gxml_xnode_get_next_sibling ((GXmlxNode*) self));
		break;
		case GXML_XATTR_CHILD_NODES:
		g_value_set_object (value, gxml_xnode_get_child_nodes ((GXmlxNode*) self));
		break;
		case GXML_XATTR_NAME:
		g_value_take_string (value, gxml_xnode_get_name ((GXmlxNode*) self));
		break;
		case GXML_XATTR_SPECIFIED:
		g_value_set_boolean (value, gxml_xattr_get_specified (self));
		break;
		case GXML_XATTR_VALUE:
		g_value_take_string (value, gxml_xnode_get_value ((GXmlxNode*) self));
		break;
		case GXML_XATTR_PREFIX:
		g_value_take_string (value, gxml_attribute_get_prefix ((GXmlAttribute*) self));
		break;
		case GXML_XATTR_NAMESPACE:
		g_value_take_object (value, gxml_attribute_get_namespace ((GXmlAttribute*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_gxml_xattr_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GXmlxAttr * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_XATTR, GXmlxAttr);
	switch (property_id) {
		case GXML_XATTR_NODE_VALUE:
		gxml_xnode_set_node_value ((GXmlxNode*) self, g_value_get_string (value));
		break;
		case GXML_XATTR_PARENT_NODE:
		gxml_xnode_set_parent_node ((GXmlxNode*) self, g_value_get_object (value));
		break;
		case GXML_XATTR_PREVIOUS_SIBLING:
		gxml_xnode_set_previous_sibling ((GXmlxNode*) self, g_value_get_object (value));
		break;
		case GXML_XATTR_NEXT_SIBLING:
		gxml_xnode_set_next_sibling ((GXmlxNode*) self, g_value_get_object (value));
		break;
		case GXML_XATTR_CHILD_NODES:
		gxml_xnode_set_child_nodes ((GXmlxNode*) self, g_value_get_object (value));
		break;
		case GXML_XATTR_SPECIFIED:
		gxml_xattr_set_specified (self, g_value_get_boolean (value));
		break;
		case GXML_XATTR_VALUE:
		gxml_xnode_set_value ((GXmlxNode*) self, g_value_get_string (value));
		break;
		case GXML_XATTR_NAMESPACE:
		gxml_attribute_set_namespace ((GXmlAttribute*) self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



