/* GXmlNode.c generated by valac 0.44.3, 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/xmlerror.h>
#include <glib/gi18n-lib.h>
#include <libxml/parser.h>

#define GXML_TYPE_DOM_EVENT_TARGET (gxml_dom_event_target_get_type ())
#define GXML_DOM_EVENT_TARGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_EVENT_TARGET, GXmlDomEventTarget))
#define GXML_IS_DOM_EVENT_TARGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_EVENT_TARGET))
#define GXML_DOM_EVENT_TARGET_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_EVENT_TARGET, GXmlDomEventTargetIface))

typedef struct _GXmlDomEventTarget GXmlDomEventTarget;
typedef struct _GXmlDomEventTargetIface GXmlDomEventTargetIface;

#define GXML_TYPE_DOM_EVENT_LISTENER (gxml_dom_event_listener_get_type ())
#define GXML_DOM_EVENT_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_EVENT_LISTENER, GXmlDomEventListener))
#define GXML_IS_DOM_EVENT_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_EVENT_LISTENER))
#define GXML_DOM_EVENT_LISTENER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_EVENT_LISTENER, GXmlDomEventListenerIface))

typedef struct _GXmlDomEventListener GXmlDomEventListener;
typedef struct _GXmlDomEventListenerIface GXmlDomEventListenerIface;

#define GXML_TYPE_DOM_EVENT (gxml_dom_event_get_type ())
#define GXML_DOM_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_EVENT, GXmlDomEvent))
#define GXML_IS_DOM_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_EVENT))
#define GXML_DOM_EVENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_EVENT, GXmlDomEventIface))

typedef struct _GXmlDomEvent GXmlDomEvent;
typedef struct _GXmlDomEventIface GXmlDomEventIface;

#define GXML_TYPE_DOM_TIME_STAMP (gxml_dom_time_stamp_get_type ())
#define GXML_DOM_TIME_STAMP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_TIME_STAMP, GXmlDomTimeStamp))
#define GXML_DOM_TIME_STAMP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_DOM_TIME_STAMP, GXmlDomTimeStampClass))
#define GXML_IS_DOM_TIME_STAMP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_TIME_STAMP))
#define GXML_IS_DOM_TIME_STAMP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_DOM_TIME_STAMP))
#define GXML_DOM_TIME_STAMP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_DOM_TIME_STAMP, GXmlDomTimeStampClass))

typedef struct _GXmlDomTimeStamp GXmlDomTimeStamp;
typedef struct _GXmlDomTimeStampClass GXmlDomTimeStampClass;
typedef enum  {
	GXML_DOM_EVENT_PHASE_NONE = 0,
	GXML_DOM_EVENT_PHASE_CAPTURING_PHASE,
	GXML_DOM_EVENT_PHASE_AT_TARGET,
	GXML_DOM_EVENT_PHASE_BUBBLING_PHASE
} GXmlDomEventPhase;

#define GXML_DOM_EVENT_TYPE_PHASE (gxml_dom_event_phase_get_type ())

#define GXML_TYPE_DOM_NODE (gxml_dom_node_get_type ())
#define GXML_DOM_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_NODE, GXmlDomNode))
#define GXML_IS_DOM_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_NODE))
#define GXML_DOM_NODE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_NODE, GXmlDomNodeIface))

typedef struct _GXmlDomNode GXmlDomNode;
typedef struct _GXmlDomNodeIface GXmlDomNodeIface;
typedef enum  {
	GXML_DOM_NODE_DOCUMENT_POSITION_NONE = 1 << 0,
	GXML_DOM_NODE_DOCUMENT_POSITION_DISCONNECTED = 1 << 1,
	GXML_DOM_NODE_DOCUMENT_POSITION_PRECEDING = 1 << 2,
	GXML_DOM_NODE_DOCUMENT_POSITION_FOLLOWING = 1 << 3,
	GXML_DOM_NODE_DOCUMENT_POSITION_CONTAINS = 1 << 4,
	GXML_DOM_NODE_DOCUMENT_POSITION_CONTAINED_BY = 1 << 5,
	GXML_DOM_NODE_DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 1 << 6
} GXmlDomNodeDocumentPosition;

#define GXML_DOM_NODE_TYPE_DOCUMENT_POSITION (gxml_dom_node_document_position_get_type ())
typedef enum  {
	GXML_DOM_NODE_NODE_TYPE_INVALID = 0,
	GXML_DOM_NODE_NODE_TYPE_ELEMENT_NODE = 1,
	GXML_DOM_NODE_NODE_TYPE_ATTRIBUTE_NODE,
	GXML_DOM_NODE_NODE_TYPE_TEXT_NODE,
	GXML_DOM_NODE_NODE_TYPE_CDATA_SECTION_NODE,
	GXML_DOM_NODE_NODE_TYPE_ENTITY_REFERENCE_NODE,
	GXML_DOM_NODE_NODE_TYPE_ENTITY_NODE,
	GXML_DOM_NODE_NODE_TYPE_PROCESSING_INSTRUCTION_NODE,
	GXML_DOM_NODE_NODE_TYPE_COMMENT_NODE,
	GXML_DOM_NODE_NODE_TYPE_DOCUMENT_NODE,
	GXML_DOM_NODE_NODE_TYPE_DOCUMENT_TYPE_NODE,
	GXML_DOM_NODE_NODE_TYPE_DOCUMENT_FRAGMENT_NODE,
	GXML_DOM_NODE_NODE_TYPE_NOTATION_NODE
} GXmlDomNodeNodeType;

#define GXML_DOM_NODE_TYPE_NODE_TYPE (gxml_dom_node_node_type_get_type ())

#define GXML_TYPE_DOM_DOCUMENT (gxml_dom_document_get_type ())
#define GXML_DOM_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_DOCUMENT, GXmlDomDocument))
#define GXML_IS_DOM_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_DOCUMENT))
#define GXML_DOM_DOCUMENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_DOCUMENT, GXmlDomDocumentIface))

typedef struct _GXmlDomDocument GXmlDomDocument;
typedef struct _GXmlDomDocumentIface GXmlDomDocumentIface;

#define GXML_TYPE_DOM_PARENT_NODE (gxml_dom_parent_node_get_type ())
#define GXML_DOM_PARENT_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_PARENT_NODE, GXmlDomParentNode))
#define GXML_IS_DOM_PARENT_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_PARENT_NODE))
#define GXML_DOM_PARENT_NODE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_PARENT_NODE, GXmlDomParentNodeIface))

typedef struct _GXmlDomParentNode GXmlDomParentNode;
typedef struct _GXmlDomParentNodeIface GXmlDomParentNodeIface;

#define GXML_TYPE_DOM_ELEMENT (gxml_dom_element_get_type ())
#define GXML_DOM_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_ELEMENT, GXmlDomElement))
#define GXML_IS_DOM_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_ELEMENT))
#define GXML_DOM_ELEMENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_ELEMENT, GXmlDomElementIface))

typedef struct _GXmlDomElement GXmlDomElement;
typedef struct _GXmlDomElementIface GXmlDomElementIface;

#define GXML_TYPE_DOM_CHILD_NODE (gxml_dom_child_node_get_type ())
#define GXML_DOM_CHILD_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_CHILD_NODE, GXmlDomChildNode))
#define GXML_IS_DOM_CHILD_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_CHILD_NODE))
#define GXML_DOM_CHILD_NODE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_CHILD_NODE, GXmlDomChildNodeIface))

typedef struct _GXmlDomChildNode GXmlDomChildNode;
typedef struct _GXmlDomChildNodeIface GXmlDomChildNodeIface;

#define GXML_TYPE_DOM_NON_DOCUMENT_TYPE_CHILD_NODE (gxml_dom_non_document_type_child_node_get_type ())
#define GXML_DOM_NON_DOCUMENT_TYPE_CHILD_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_NON_DOCUMENT_TYPE_CHILD_NODE, GXmlDomNonDocumentTypeChildNode))
#define GXML_IS_DOM_NON_DOCUMENT_TYPE_CHILD_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_NON_DOCUMENT_TYPE_CHILD_NODE))
#define GXML_DOM_NON_DOCUMENT_TYPE_CHILD_NODE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_NON_DOCUMENT_TYPE_CHILD_NODE, GXmlDomNonDocumentTypeChildNodeIface))

typedef struct _GXmlDomNonDocumentTypeChildNode GXmlDomNonDocumentTypeChildNode;
typedef struct _GXmlDomNonDocumentTypeChildNodeIface GXmlDomNonDocumentTypeChildNodeIface;

#define GXML_TYPE_DOM_HTML_COLLECTION (gxml_dom_html_collection_get_type ())
#define GXML_DOM_HTML_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_HTML_COLLECTION, GXmlDomHTMLCollection))
#define GXML_IS_DOM_HTML_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_HTML_COLLECTION))
#define GXML_DOM_HTML_COLLECTION_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_HTML_COLLECTION, GXmlDomHTMLCollectionIface))

typedef struct _GXmlDomHTMLCollection GXmlDomHTMLCollection;
typedef struct _GXmlDomHTMLCollectionIface GXmlDomHTMLCollectionIface;

#define GXML_TYPE_DOM_TOKEN_LIST (gxml_dom_token_list_get_type ())
#define GXML_DOM_TOKEN_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_TOKEN_LIST, GXmlDomTokenList))
#define GXML_IS_DOM_TOKEN_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_TOKEN_LIST))
#define GXML_DOM_TOKEN_LIST_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_TOKEN_LIST, GXmlDomTokenListIface))

typedef struct _GXmlDomTokenList GXmlDomTokenList;
typedef struct _GXmlDomTokenListIface GXmlDomTokenListIface;

#define GXML_TYPE_DOM_NAMED_NODE_MAP (gxml_dom_named_node_map_get_type ())
#define GXML_DOM_NAMED_NODE_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_NAMED_NODE_MAP, GXmlDomNamedNodeMap))
#define GXML_IS_DOM_NAMED_NODE_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_NAMED_NODE_MAP))
#define GXML_DOM_NAMED_NODE_MAP_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_NAMED_NODE_MAP, GXmlDomNamedNodeMapIface))

typedef struct _GXmlDomNamedNodeMap GXmlDomNamedNodeMap;
typedef struct _GXmlDomNamedNodeMapIface GXmlDomNamedNodeMapIface;

#define GXML_TYPE_DOM_NODE_LIST (gxml_dom_node_list_get_type ())
#define GXML_DOM_NODE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_NODE_LIST, GXmlDomNodeList))
#define GXML_IS_DOM_NODE_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_NODE_LIST))
#define GXML_DOM_NODE_LIST_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_NODE_LIST, GXmlDomNodeListIface))

typedef struct _GXmlDomNodeList GXmlDomNodeList;
typedef struct _GXmlDomNodeListIface GXmlDomNodeListIface;

#define GXML_TYPE_DOM_ELEMENT_LIST (gxml_dom_element_list_get_type ())
#define GXML_DOM_ELEMENT_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_ELEMENT_LIST, GXmlDomElementList))
#define GXML_DOM_ELEMENT_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_DOM_ELEMENT_LIST, GXmlDomElementListClass))
#define GXML_IS_DOM_ELEMENT_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_ELEMENT_LIST))
#define GXML_IS_DOM_ELEMENT_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_DOM_ELEMENT_LIST))
#define GXML_DOM_ELEMENT_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_DOM_ELEMENT_LIST, GXmlDomElementListClass))

typedef struct _GXmlDomElementList GXmlDomElementList;
typedef struct _GXmlDomElementListClass GXmlDomElementListClass;

#define GXML_TYPE_DOM_NON_ELEMENT_PARENT_NODE (gxml_dom_non_element_parent_node_get_type ())
#define GXML_DOM_NON_ELEMENT_PARENT_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_NON_ELEMENT_PARENT_NODE, GXmlDomNonElementParentNode))
#define GXML_IS_DOM_NON_ELEMENT_PARENT_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_NON_ELEMENT_PARENT_NODE))
#define GXML_DOM_NON_ELEMENT_PARENT_NODE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_NON_ELEMENT_PARENT_NODE, GXmlDomNonElementParentNodeIface))

typedef struct _GXmlDomNonElementParentNode GXmlDomNonElementParentNode;
typedef struct _GXmlDomNonElementParentNodeIface GXmlDomNonElementParentNodeIface;

#define GXML_TYPE_DOM_DOCUMENT_FRAGMENT (gxml_dom_document_fragment_get_type ())
#define GXML_DOM_DOCUMENT_FRAGMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_DOCUMENT_FRAGMENT, GXmlDomDocumentFragment))
#define GXML_IS_DOM_DOCUMENT_FRAGMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_DOCUMENT_FRAGMENT))
#define GXML_DOM_DOCUMENT_FRAGMENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_DOCUMENT_FRAGMENT, GXmlDomDocumentFragmentIface))

typedef struct _GXmlDomDocumentFragment GXmlDomDocumentFragment;
typedef struct _GXmlDomDocumentFragmentIface GXmlDomDocumentFragmentIface;

#define GXML_TYPE_DOM_TEXT (gxml_dom_text_get_type ())
#define GXML_DOM_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_TEXT, GXmlDomText))
#define GXML_IS_DOM_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_TEXT))
#define GXML_DOM_TEXT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_TEXT, GXmlDomTextIface))

typedef struct _GXmlDomText GXmlDomText;
typedef struct _GXmlDomTextIface GXmlDomTextIface;

#define GXML_TYPE_DOM_CHARACTER_DATA (gxml_dom_character_data_get_type ())
#define GXML_DOM_CHARACTER_DATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_CHARACTER_DATA, GXmlDomCharacterData))
#define GXML_IS_DOM_CHARACTER_DATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_CHARACTER_DATA))
#define GXML_DOM_CHARACTER_DATA_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_CHARACTER_DATA, GXmlDomCharacterDataIface))

typedef struct _GXmlDomCharacterData GXmlDomCharacterData;
typedef struct _GXmlDomCharacterDataIface GXmlDomCharacterDataIface;

#define GXML_TYPE_DOM_COMMENT (gxml_dom_comment_get_type ())
#define GXML_DOM_COMMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_COMMENT, GXmlDomComment))
#define GXML_IS_DOM_COMMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_COMMENT))
#define GXML_DOM_COMMENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_COMMENT, GXmlDomCommentIface))

typedef struct _GXmlDomComment GXmlDomComment;
typedef struct _GXmlDomCommentIface GXmlDomCommentIface;

#define GXML_TYPE_DOM_PROCESSING_INSTRUCTION (gxml_dom_processing_instruction_get_type ())
#define GXML_DOM_PROCESSING_INSTRUCTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_PROCESSING_INSTRUCTION, GXmlDomProcessingInstruction))
#define GXML_IS_DOM_PROCESSING_INSTRUCTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_PROCESSING_INSTRUCTION))
#define GXML_DOM_PROCESSING_INSTRUCTION_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_PROCESSING_INSTRUCTION, GXmlDomProcessingInstructionIface))

typedef struct _GXmlDomProcessingInstruction GXmlDomProcessingInstruction;
typedef struct _GXmlDomProcessingInstructionIface GXmlDomProcessingInstructionIface;

#define GXML_TYPE_DOM_RANGE (gxml_dom_range_get_type ())
#define GXML_DOM_RANGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_RANGE, GXmlDomRange))
#define GXML_IS_DOM_RANGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_RANGE))
#define GXML_DOM_RANGE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_RANGE, GXmlDomRangeIface))

typedef struct _GXmlDomRange GXmlDomRange;
typedef struct _GXmlDomRangeIface GXmlDomRangeIface;
typedef enum  {
	GXML_DOM_RANGE_BOUNDARY_POINTS_START_TO_START = 0,
	GXML_DOM_RANGE_BOUNDARY_POINTS_START_TO_END,
	GXML_DOM_RANGE_BOUNDARY_POINTS_END_TO_END,
	GXML_DOM_RANGE_BOUNDARY_POINTS_END_TO_START
} GXmlDomRangeBoundaryPoints;

#define GXML_DOM_RANGE_TYPE_BOUNDARY_POINTS (gxml_dom_range_boundary_points_get_type ())

#define GXML_TYPE_DOM_NODE_FILTER (gxml_dom_node_filter_get_type ())
#define GXML_DOM_NODE_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_NODE_FILTER, GXmlDomNodeFilter))
#define GXML_DOM_NODE_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_DOM_NODE_FILTER, GXmlDomNodeFilterClass))
#define GXML_IS_DOM_NODE_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_NODE_FILTER))
#define GXML_IS_DOM_NODE_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_DOM_NODE_FILTER))
#define GXML_DOM_NODE_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_DOM_NODE_FILTER, GXmlDomNodeFilterClass))

typedef struct _GXmlDomNodeFilter GXmlDomNodeFilter;
typedef struct _GXmlDomNodeFilterClass GXmlDomNodeFilterClass;

#define GXML_TYPE_DOM_NODE_ITERATOR (gxml_dom_node_iterator_get_type ())
#define GXML_DOM_NODE_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_NODE_ITERATOR, GXmlDomNodeIterator))
#define GXML_IS_DOM_NODE_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_NODE_ITERATOR))
#define GXML_DOM_NODE_ITERATOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_NODE_ITERATOR, GXmlDomNodeIteratorIface))

typedef struct _GXmlDomNodeIterator GXmlDomNodeIterator;
typedef struct _GXmlDomNodeIteratorIface GXmlDomNodeIteratorIface;

#define GXML_TYPE_DOM_TREE_WALKER (gxml_dom_tree_walker_get_type ())
#define GXML_DOM_TREE_WALKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_TREE_WALKER, GXmlDomTreeWalker))
#define GXML_IS_DOM_TREE_WALKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_TREE_WALKER))
#define GXML_DOM_TREE_WALKER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_TREE_WALKER, GXmlDomTreeWalkerIface))

typedef struct _GXmlDomTreeWalker GXmlDomTreeWalker;
typedef struct _GXmlDomTreeWalkerIface GXmlDomTreeWalkerIface;

#define GXML_TYPE_PARSER (gxml_parser_get_type ())
#define GXML_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_PARSER, GXmlParser))
#define GXML_IS_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_PARSER))
#define GXML_PARSER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_PARSER, GXmlParserIface))

typedef struct _GXmlParser GXmlParser;
typedef struct _GXmlParserIface GXmlParserIface;

#define GXML_TYPE_DOM_IMPLEMENTATION (gxml_dom_implementation_get_type ())
#define GXML_DOM_IMPLEMENTATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_IMPLEMENTATION, GXmlDomImplementation))
#define GXML_IS_DOM_IMPLEMENTATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_IMPLEMENTATION))
#define GXML_DOM_IMPLEMENTATION_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_IMPLEMENTATION, GXmlDomImplementationIface))

typedef struct _GXmlDomImplementation GXmlDomImplementation;
typedef struct _GXmlDomImplementationIface GXmlDomImplementationIface;

#define GXML_TYPE_DOM_DOCUMENT_TYPE (gxml_dom_document_type_get_type ())
#define GXML_DOM_DOCUMENT_TYPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_DOCUMENT_TYPE, GXmlDomDocumentType))
#define GXML_IS_DOM_DOCUMENT_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_DOCUMENT_TYPE))
#define GXML_DOM_DOCUMENT_TYPE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_DOCUMENT_TYPE, GXmlDomDocumentTypeIface))

typedef struct _GXmlDomDocumentType GXmlDomDocumentType;
typedef struct _GXmlDomDocumentTypeIface GXmlDomDocumentTypeIface;

#define GXML_TYPE_DOM_XML_DOCUMENT (gxml_dom_xml_document_get_type ())
#define GXML_DOM_XML_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_XML_DOCUMENT, GXmlDomXMLDocument))
#define GXML_IS_DOM_XML_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_XML_DOCUMENT))
#define GXML_DOM_XML_DOCUMENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_XML_DOCUMENT, GXmlDomXMLDocumentIface))

typedef struct _GXmlDomXMLDocument GXmlDomXMLDocument;
typedef struct _GXmlDomXMLDocumentIface GXmlDomXMLDocumentIface;

#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_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;
typedef enum  {
	GXML_NODE_TYPE_INVALID = 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;

#define GXML_TYPE_NODE_TYPE (gxml_node_type_get_type ())

#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;
enum  {
	GXML_GNODE_0_PROPERTY,
	GXML_GNODE_ATTRS_PROPERTY,
	GXML_GNODE_CHILDREN_NODES_PROPERTY,
	GXML_GNODE_NAMESPACES_PROPERTY,
	GXML_GNODE_DOCUMENT_PROPERTY,
	GXML_GNODE_PARENT_PROPERTY,
	GXML_GNODE_TYPE_NODE_PROPERTY,
	GXML_GNODE_NAME_PROPERTY,
	GXML_GNODE_VALUE_PROPERTY,
	GXML_GNODE_NODE_TYPE_PROPERTY,
	GXML_GNODE_NODE_NAME_PROPERTY,
	GXML_GNODE_BASE_URI_PROPERTY,
	GXML_GNODE_OWNER_DOCUMENT_PROPERTY,
	GXML_GNODE_PARENT_NODE_PROPERTY,
	GXML_GNODE_PARENT_ELEMENT_PROPERTY,
	GXML_GNODE_CHILD_NODES_PROPERTY,
	GXML_GNODE_FIRST_CHILD_PROPERTY,
	GXML_GNODE_LAST_CHILD_PROPERTY,
	GXML_GNODE_PREVIOUS_SIBLING_PROPERTY,
	GXML_GNODE_NEXT_SIBLING_PROPERTY,
	GXML_GNODE_NODE_VALUE_PROPERTY,
	GXML_GNODE_TEXT_CONTENT_PROPERTY,
	GXML_GNODE_NUM_PROPERTIES
};
static GParamSpec* gxml_gnode_properties[GXML_GNODE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define GXML_TYPE_GCHILD_NODE (gxml_gchild_node_get_type ())
#define GXML_GCHILD_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GCHILD_NODE, GXmlGChildNode))
#define GXML_GCHILD_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GCHILD_NODE, GXmlGChildNodeClass))
#define GXML_IS_GCHILD_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GCHILD_NODE))
#define GXML_IS_GCHILD_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GCHILD_NODE))
#define GXML_GCHILD_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GCHILD_NODE, GXmlGChildNodeClass))

typedef struct _GXmlGChildNode GXmlGChildNode;
typedef struct _GXmlGChildNodeClass GXmlGChildNodeClass;

#define GXML_TYPE_GNON_DOCUMENT_CHILD_NODE (gxml_gnon_document_child_node_get_type ())
#define GXML_GNON_DOCUMENT_CHILD_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GNON_DOCUMENT_CHILD_NODE, GXmlGNonDocumentChildNode))
#define GXML_GNON_DOCUMENT_CHILD_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GNON_DOCUMENT_CHILD_NODE, GXmlGNonDocumentChildNodeClass))
#define GXML_IS_GNON_DOCUMENT_CHILD_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GNON_DOCUMENT_CHILD_NODE))
#define GXML_IS_GNON_DOCUMENT_CHILD_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GNON_DOCUMENT_CHILD_NODE))
#define GXML_GNON_DOCUMENT_CHILD_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GNON_DOCUMENT_CHILD_NODE, GXmlGNonDocumentChildNodeClass))

typedef struct _GXmlGNonDocumentChildNode GXmlGNonDocumentChildNode;
typedef struct _GXmlGNonDocumentChildNodeClass GXmlGNonDocumentChildNodeClass;

#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_GCHARACTER_DATA (gxml_gcharacter_data_get_type ())
#define GXML_GCHARACTER_DATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GCHARACTER_DATA, GXmlGCharacterData))
#define GXML_GCHARACTER_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GCHARACTER_DATA, GXmlGCharacterDataClass))
#define GXML_IS_GCHARACTER_DATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GCHARACTER_DATA))
#define GXML_IS_GCHARACTER_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GCHARACTER_DATA))
#define GXML_GCHARACTER_DATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GCHARACTER_DATA, GXmlGCharacterDataClass))

typedef struct _GXmlGCharacterData GXmlGCharacterData;
typedef struct _GXmlGCharacterDataClass GXmlGCharacterDataClass;

#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_DOCUMENT_TYPE (gxml_document_type_get_type ())
#define GXML_DOCUMENT_TYPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOCUMENT_TYPE, GXmlDocumentType))
#define GXML_IS_DOCUMENT_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOCUMENT_TYPE))
#define GXML_DOCUMENT_TYPE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOCUMENT_TYPE, GXmlDocumentTypeIface))

typedef struct _GXmlDocumentType GXmlDocumentType;
typedef struct _GXmlDocumentTypeIface GXmlDocumentTypeIface;

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

#define GXML_TYPE_TEXT (gxml_text_get_type ())
#define GXML_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_TEXT, GXmlText))
#define GXML_IS_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_TEXT))
#define GXML_TEXT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_TEXT, GXmlTextIface))

typedef struct _GXmlText GXmlText;
typedef struct _GXmlTextIface GXmlTextIface;

#define GXML_TYPE_PROCESSING_INSTRUCTION (gxml_processing_instruction_get_type ())
#define GXML_PROCESSING_INSTRUCTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_PROCESSING_INSTRUCTION, GXmlProcessingInstruction))
#define GXML_IS_PROCESSING_INSTRUCTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_PROCESSING_INSTRUCTION))
#define GXML_PROCESSING_INSTRUCTION_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_PROCESSING_INSTRUCTION, GXmlProcessingInstructionIface))

typedef struct _GXmlProcessingInstruction GXmlProcessingInstruction;
typedef struct _GXmlProcessingInstructionIface GXmlProcessingInstructionIface;

#define GXML_TYPE_COMMENT (gxml_comment_get_type ())
#define GXML_COMMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_COMMENT, GXmlComment))
#define GXML_IS_COMMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_COMMENT))
#define GXML_COMMENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_COMMENT, GXmlCommentIface))

typedef struct _GXmlComment GXmlComment;
typedef struct _GXmlCommentIface GXmlCommentIface;

#define GXML_TYPE_ELEMENT (gxml_element_get_type ())
#define GXML_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_ELEMENT, GXmlElement))
#define GXML_IS_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_ELEMENT))
#define GXML_ELEMENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_ELEMENT, GXmlElementIface))

typedef struct _GXmlElement GXmlElement;
typedef struct _GXmlElementIface GXmlElementIface;

/**
 * Auxiliary error codes for parsing/writting libxml2 powered classes
 */
typedef enum  {
	GXML_ERROR_NOT_SUPPORTED,
	GXML_ERROR_PARSER,
	GXML_ERROR_WRITER
} GXmlError;
#define GXML_ERROR gxml_error_quark ()
struct _GXmlDomEventIface {
	GTypeInterface parent_iface;
	void (*stop_propagation) (GXmlDomEvent* self);
	void (*stop_immediate_propagation) (GXmlDomEvent* self);
	void (*prevent_default) (GXmlDomEvent* self);
	void (*init_event) (GXmlDomEvent* self, const gchar* type, gboolean bubbles, gboolean cancelable);
	const gchar* (*get_etype) (GXmlDomEvent* self);
	GXmlDomEventTarget* (*get_event_target) (GXmlDomEvent* self);
	GXmlDomEventTarget* (*get_current_target) (GXmlDomEvent* self);
	gboolean (*get_bubbles) (GXmlDomEvent* self);
	gboolean (*get_cancelable) (GXmlDomEvent* self);
	gboolean (*get_is_trusted) (GXmlDomEvent* self);
	GXmlDomTimeStamp* (*get_time_stamp) (GXmlDomEvent* self);
	gboolean (*get_default_prevented) (GXmlDomEvent* self);
	GXmlDomEventPhase (*get_event_phase) (GXmlDomEvent* self);
};

struct _GXmlDomEventListenerIface {
	GTypeInterface parent_iface;
	void (*handle_event) (GXmlDomEventListener* self, GXmlDomEvent* event);
};

struct _GXmlDomEventTargetIface {
	GTypeInterface parent_iface;
	void (*add_event_listener) (GXmlDomEventTarget* self, const gchar* type, GXmlDomEventListener* callback, gboolean capture);
	void (*remove_event_listener) (GXmlDomEventTarget* self, const gchar* type, GXmlDomEventListener* callback, gboolean capture);
	gboolean (*dispatch_event) (GXmlDomEventTarget* self, GXmlDomEvent* event, GError** error);
};

struct _GXmlDomChildNodeIface {
	GTypeInterface parent_iface;
	void (*remove) (GXmlDomChildNode* self);
};

struct _GXmlDomNonDocumentTypeChildNodeIface {
	GTypeInterface parent_iface;
	GXmlDomElement* (*get_previous_element_sibling) (GXmlDomNonDocumentTypeChildNode* self);
	GXmlDomElement* (*get_next_element_sibling) (GXmlDomNonDocumentTypeChildNode* self);
};

struct _GXmlDomHTMLCollectionIface {
	GTypeInterface parent_iface;
	GXmlDomElement* (*get_element) (GXmlDomHTMLCollection* self, gint index);
	GXmlDomElement** (*to_array) (GXmlDomHTMLCollection* self, gint* result_length1);
	GXmlDomElement* (*item) (GXmlDomHTMLCollection* self, gint index);
	GXmlDomElement* (*named_item) (GXmlDomHTMLCollection* self, const gchar* name);
	gint (*get_length) (GXmlDomHTMLCollection* self);
};

struct _GXmlDomTokenListIface {
	GTypeInterface parent_iface;
	gchar* (*item) (GXmlDomTokenList* self, gint index);
	gboolean (*contains) (GXmlDomTokenList* self, const gchar* token, GError** error);
	void (*add) (GXmlDomTokenList* self, gchar** tokens, gint tokens_length1, GError** error);
	void (*remove) (GXmlDomTokenList* self, gchar** tokens, gint tokens_length1);
	gboolean (*toggle) (GXmlDomTokenList* self, const gchar* token, gboolean force, gboolean _auto_, GError** error);
	gchar* (*to_string) (GXmlDomTokenList* self);
	gint (*get_length) (GXmlDomTokenList* self);
};

struct _GXmlDomNamedNodeMapIface {
	GTypeInterface parent_iface;
	GXmlDomNode* (*item) (GXmlDomNamedNodeMap* self, gint index);
	GXmlDomNode* (*get_named_item) (GXmlDomNamedNodeMap* self, const gchar* name);
	GXmlDomNode* (*set_named_item) (GXmlDomNamedNodeMap* self, GXmlDomNode* node, GError** error);
	GXmlDomNode* (*remove_named_item) (GXmlDomNamedNodeMap* self, const gchar* name, GError** error);
	GXmlDomNode* (*remove_named_item_ns) (GXmlDomNamedNodeMap* self, const gchar* namespace_uri, const gchar* localName, GError** error);
	GXmlDomNode* (*get_named_item_ns) (GXmlDomNamedNodeMap* self, const gchar* namespace_uri, const gchar* local_name, GError** error);
	GXmlDomNode* (*set_named_item_ns) (GXmlDomNamedNodeMap* self, GXmlDomNode* node, GError** error);
	gint (*get_length) (GXmlDomNamedNodeMap* self);
};

struct _GXmlDomElementIface {
	GTypeInterface parent_iface;
	gchar* (*get_attribute) (GXmlDomElement* self, const gchar* name);
	gchar* (*get_attribute_ns) (GXmlDomElement* self, const gchar* namespace, const gchar* local_name);
	void (*set_attribute) (GXmlDomElement* self, const gchar* name, const gchar* value, GError** error);
	void (*set_attribute_ns) (GXmlDomElement* self, const gchar* namespace, const gchar* name, const gchar* value, GError** error);
	void (*remove_attribute) (GXmlDomElement* self, const gchar* name);
	void (*remove_attribute_ns) (GXmlDomElement* self, const gchar* namespace, const gchar* local_name);
	gboolean (*has_attribute) (GXmlDomElement* self, const gchar* name);
	gboolean (*has_attribute_ns) (GXmlDomElement* self, const gchar* namespace, const gchar* local_name);
	GXmlDomHTMLCollection* (*get_elements_by_tag_name) (GXmlDomElement* self, const gchar* local_name);
	GXmlDomHTMLCollection* (*get_elements_by_tag_name_ns) (GXmlDomElement* self, const gchar* namespace, const gchar* local_name);
	GXmlDomHTMLCollection* (*get_elements_by_class_name) (GXmlDomElement* self, const gchar* class_names);
	gboolean (*matches) (GXmlDomElement* self, const gchar* selectors, GError** error);
	void (*read_from_uri) (GXmlDomElement* self, const gchar* uri, GError** error);
	void (*read_from_uri_async) (GXmlDomElement* self, const gchar* uri, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_from_uri_finish) (GXmlDomElement* self, GAsyncResult* _res_, GError** error);
	void (*read_from_file) (GXmlDomElement* self, GFile* f, GCancellable* cancellable, GError** error);
	void (*read_from_file_async) (GXmlDomElement* self, GFile* f, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_from_file_finish) (GXmlDomElement* self, GAsyncResult* _res_, GError** error);
	void (*read_from_stream) (GXmlDomElement* self, GInputStream* istream, GCancellable* cancellable, GError** error);
	void (*read_from_stream_async) (GXmlDomElement* self, GInputStream* istream, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_from_stream_finish) (GXmlDomElement* self, GAsyncResult* _res_, GError** error);
	void (*read_from_string) (GXmlDomElement* self, const gchar* str, GCancellable* cancellable, GError** error);
	void (*read_from_string_async) (GXmlDomElement* self, const gchar* str, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_from_string_finish) (GXmlDomElement* self, GAsyncResult* _res_, GError** error);
	gchar* (*write_string) (GXmlDomElement* self, GCancellable* cancellable, GError** error);
	void (*write_string_async) (GXmlDomElement* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gchar* (*write_string_finish) (GXmlDomElement* self, GAsyncResult* _res_, GError** error);
	void (*write_file) (GXmlDomElement* self, GFile* f, GCancellable* cancellable, GError** error);
	void (*write_file_async) (GXmlDomElement* self, GFile* f, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*write_file_finish) (GXmlDomElement* self, GAsyncResult* _res_, GError** error);
	void (*write_stream) (GXmlDomElement* self, GOutputStream* stream, GError** error);
	void (*write_stream_async) (GXmlDomElement* self, GOutputStream* stream, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*write_stream_finish) (GXmlDomElement* self, GAsyncResult* _res_, GError** error);
	GInputStream* (*create_stream) (GXmlDomElement* self, GError** error);
	void (*create_stream_async) (GXmlDomElement* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GInputStream* (*create_stream_finish) (GXmlDomElement* self, GAsyncResult* _res_, GError** error);
	gchar* (*get_namespace_uri) (GXmlDomElement* self);
	gchar* (*get_prefix) (GXmlDomElement* self);
	gchar* (*get_local_name) (GXmlDomElement* self);
	gchar* (*get_tag_name) (GXmlDomElement* self);
	gchar* (*get_id) (GXmlDomElement* self);
	void (*set_id) (GXmlDomElement* self, const gchar* value);
	gchar* (*get_class_name) (GXmlDomElement* self);
	void (*set_class_name) (GXmlDomElement* self, const gchar* value);
	GXmlDomTokenList* (*get_class_list) (GXmlDomElement* self);
	GXmlDomNamedNodeMap* (*get_attributes) (GXmlDomElement* self);
};

struct _GXmlDomNodeListIface {
	GTypeInterface parent_iface;
	GXmlDomNode* (*item) (GXmlDomNodeList* self, gint index);
	gint (*get_length) (GXmlDomNodeList* self);
};

struct _GXmlDomParentNodeIface {
	GTypeInterface parent_iface;
	GXmlDomElement* (*query_selector) (GXmlDomParentNode* self, const gchar* selectors, GError** error);
	GXmlDomNodeList* (*query_selector_all) (GXmlDomParentNode* self, const gchar* selectors, GError** error);
	GXmlDomElementList* (*get_elements_by_property_value) (GXmlDomParentNode* self, const gchar* property, const gchar* value);
	GXmlDomHTMLCollection* (*get_children) (GXmlDomParentNode* self);
	GXmlDomElement* (*get_first_element_child) (GXmlDomParentNode* self);
	GXmlDomElement* (*get_last_element_child) (GXmlDomParentNode* self);
	gint (*get_child_element_count) (GXmlDomParentNode* self);
};

struct _GXmlDomNonElementParentNodeIface {
	GTypeInterface parent_iface;
	GXmlDomElement* (*get_element_by_id) (GXmlDomNonElementParentNode* self, const gchar* element_id, GError** error);
};

struct _GXmlDomDocumentFragmentIface {
	GTypeInterface parent_iface;
};

struct _GXmlDomCharacterDataIface {
	GTypeInterface parent_iface;
	gchar* (*substring_data) (GXmlDomCharacterData* self, gint offset, gint count, GError** error);
	void (*append_data) (GXmlDomCharacterData* self, const gchar* data);
	void (*insert_data) (GXmlDomCharacterData* self, gint offset, const gchar* data, GError** error);
	void (*delete_data) (GXmlDomCharacterData* self, gint offset, gint count, GError** error);
	void (*replace_data) (GXmlDomCharacterData* self, gint offset, gint count, const gchar* data, GError** error);
	gchar* (*get_data) (GXmlDomCharacterData* self);
	void (*set_data) (GXmlDomCharacterData* self, const gchar* value);
	gint (*get_length) (GXmlDomCharacterData* self);
};

struct _GXmlDomTextIface {
	GTypeInterface parent_iface;
	GXmlDomText* (*split_text) (GXmlDomText* self, gint offset, GError** error);
	gchar* (*get_whole_text) (GXmlDomText* self);
};

struct _GXmlDomCommentIface {
	GTypeInterface parent_iface;
};

struct _GXmlDomProcessingInstructionIface {
	GTypeInterface parent_iface;
	gchar* (*get_target) (GXmlDomProcessingInstruction* self);
};

struct _GXmlDomRangeIface {
	GTypeInterface parent_iface;
	void (*set_start) (GXmlDomRange* self, GXmlDomNode* node, gint offset, GError** error);
	void (*set_end) (GXmlDomRange* self, GXmlDomNode* node, gint offset, GError** error);
	void (*set_start_before) (GXmlDomRange* self, GXmlDomNode* node, GError** error);
	void (*set_start_after) (GXmlDomRange* self, GXmlDomNode* node, GError** error);
	void (*set_end_before) (GXmlDomRange* self, GXmlDomNode* node, GError** error);
	void (*set_end_after) (GXmlDomRange* self, GXmlDomNode* node, GError** error);
	void (*collapse) (GXmlDomRange* self, gboolean to_start, GError** error);
	void (*select_node) (GXmlDomRange* self, GXmlDomNode* node, GError** error);
	void (*select_node_contents) (GXmlDomRange* self, GXmlDomNode* node, GError** error);
	gint (*compare_boundary_points) (GXmlDomRange* self, GXmlDomRangeBoundaryPoints how, GXmlDomRange* sourceRange, GError** error);
	void (*delete_contents) (GXmlDomRange* self, GError** error);
	GXmlDomDocumentFragment* (*extract_contents) (GXmlDomRange* self, GError** error);
	GXmlDomDocumentFragment* (*clone_contents) (GXmlDomRange* self, GError** error);
	void (*insert_node) (GXmlDomRange* self, GXmlDomNode* node);
	void (*surround_contents) (GXmlDomRange* self, GXmlDomNode* newParent);
	GXmlDomRange* (*clone_range) (GXmlDomRange* self);
	void (*detach) (GXmlDomRange* self);
	gboolean (*is_point_in_range) (GXmlDomRange* self, GXmlDomNode* node, gint offset);
	gshort (*compare_point) (GXmlDomRange* self, GXmlDomNode* node, gint offset);
	gboolean (*intersects_node) (GXmlDomRange* self, GXmlDomNode* node);
	gchar* (*to_string) (GXmlDomRange* self);
	GXmlDomNode* (*get_start_container) (GXmlDomRange* self);
	gint (*get_start_offset) (GXmlDomRange* self);
	GXmlDomNode* (*get_end_container) (GXmlDomRange* self);
	gint (*get_end_offset) (GXmlDomRange* self);
	gboolean (*get_collapsed) (GXmlDomRange* self);
	GXmlDomNode* (*get_common_ancestor_container) (GXmlDomRange* self);
};

struct _GXmlDomNodeIteratorIface {
	GTypeInterface parent_iface;
	GXmlDomNode* (*next_node) (GXmlDomNodeIterator* self);
	GXmlDomNode* (*previous_node) (GXmlDomNodeIterator* self);
	void (*detach) (GXmlDomNodeIterator* self);
	GXmlDomNode* (*get_root) (GXmlDomNodeIterator* self);
	GXmlDomNode* (*get_reference_node) (GXmlDomNodeIterator* self);
	gboolean (*get_pointer_before_reference_node) (GXmlDomNodeIterator* self);
	gint (*get_what_to_show) (GXmlDomNodeIterator* self);
	GXmlDomNodeFilter* (*get_filter) (GXmlDomNodeIterator* self);
};

struct _GXmlDomTreeWalkerIface {
	GTypeInterface parent_iface;
	GXmlDomNode* (*parent_node) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*first_child) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*last_child) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*previous_sibling) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*next_sibling) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*previous_node) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*next_node) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*get_root) (GXmlDomTreeWalker* self);
	gint (*get_what_to_show) (GXmlDomTreeWalker* self);
	GXmlDomNodeFilter* (*get_filter) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*get_current_node) (GXmlDomTreeWalker* self);
};

struct _GXmlParserIface {
	GTypeInterface parent_iface;
	void (*write_file) (GXmlParser* self, GFile* file, GError** error);
	void (*write_file_async) (GXmlParser* self, GFile* file, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*write_file_finish) (GXmlParser* self, GAsyncResult* _res_, GError** error);
	gchar* (*write_string) (GXmlParser* self, GError** error);
	void (*write_string_async) (GXmlParser* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gchar* (*write_string_finish) (GXmlParser* self, GAsyncResult* _res_, GError** error);
	void (*write_stream) (GXmlParser* self, GOutputStream* stream, GError** error);
	void (*write_stream_async) (GXmlParser* self, GOutputStream* stream, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*write_stream_finish) (GXmlParser* self, GAsyncResult* _res_, GError** error);
	void (*read_file) (GXmlParser* self, GFile* file, GError** error);
	void (*read_file_async) (GXmlParser* self, GFile* file, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_file_finish) (GXmlParser* self, GAsyncResult* _res_, GError** error);
	void (*read_stream) (GXmlParser* self, GInputStream* stream, GError** error);
	void (*read_stream_async) (GXmlParser* self, GInputStream* stream, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_stream_finish) (GXmlParser* self, GAsyncResult* _res_, GError** error);
	void (*read_string) (GXmlParser* self, const gchar* str, GError** error);
	void (*read_string_async) (GXmlParser* self, const gchar* str, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_string_finish) (GXmlParser* self, GAsyncResult* _res_, GError** error);
	GInputStream* (*create_stream) (GXmlParser* self, GError** error);
	void (*create_stream_async) (GXmlParser* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GInputStream* (*create_stream_finish) (GXmlParser* self, GAsyncResult* _res_, GError** error);
	void (*read_child_nodes) (GXmlParser* self, GXmlDomNode* parent, GError** error);
	void (*read_child_nodes_async) (GXmlParser* self, GXmlDomNode* parent, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_child_nodes_finish) (GXmlParser* self, GAsyncResult* _res_, GError** error);
	gboolean (*read_child_node) (GXmlParser* self, GXmlDomNode* parent, GError** error);
	gboolean (*read_child_element) (GXmlParser* self, GXmlDomNode* parent, GError** error);
	gboolean (*read_element_property) (GXmlParser* self, GXmlDomNode* parent, GXmlDomNode* * element, GError** error);
	gboolean (*add_element_collection) (GXmlParser* self, GXmlDomNode* parent, GXmlDomNode* * element, GError** error);
	void (*read_child_nodes_stream) (GXmlParser* self, GInputStream* istream, GError** error);
	void (*read_child_nodes_string) (GXmlParser* self, const gchar* str, GError** error);
	gchar* (*read_unparsed) (GXmlParser* self, GError** error);
	gboolean (*move_next_node) (GXmlParser* self, GError** error);
	gboolean (*current_is_empty_element) (GXmlParser* self);
	gboolean (*current_is_element) (GXmlParser* self);
	gboolean (*current_is_document) (GXmlParser* self);
	gchar* (*current_node_name) (GXmlParser* self);
	GXmlDomElement* (*create_element) (GXmlParser* self, GXmlDomNode* parent, GError** error);
	void (*read_element) (GXmlParser* self, GXmlDomElement* element, GError** error);
	gboolean (*get_backup) (GXmlParser* self);
	void (*set_backup) (GXmlParser* self, gboolean value);
	gboolean (*get_indent) (GXmlParser* self);
	void (*set_indent) (GXmlParser* self, gboolean value);
	GCancellable* (*get_cancellable) (GXmlParser* self);
	void (*set_cancellable) (GXmlParser* self, GCancellable* value);
	GXmlDomNode* (*get_node) (GXmlParser* self);
};

struct _GXmlDomDocumentTypeIface {
	GTypeInterface parent_iface;
	const gchar* (*get_name) (GXmlDomDocumentType* self);
	const gchar* (*get_public_id) (GXmlDomDocumentType* self);
	const gchar* (*get_system_id) (GXmlDomDocumentType* self);
};

struct _GXmlDomXMLDocumentIface {
	GTypeInterface parent_iface;
};

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

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);
	GXmlElementList* (*get_elements_by_name) (GXmlNode* self, const gchar* name);
	GXmlElementList* (*get_elements_by_name_ns) (GXmlNode* self, const gchar* name, const gchar* ns);
	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_children_nodes) (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 _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 _GXmlDomImplementationIface {
	GTypeInterface parent_iface;
	GXmlDomDocumentType* (*create_document_type) (GXmlDomImplementation* self, const gchar* qualified_name, const gchar* public_id, const gchar* system_id, GError** error);
	GXmlDomXMLDocument* (*create_document) (GXmlDomImplementation* self, const gchar* nspace, const gchar* qualified_name, GXmlDomDocumentType* doctype, GError** error);
	GXmlDocument* (*create_html_document) (GXmlDomImplementation* self, const gchar* title);
	gboolean (*has_feature) (GXmlDomImplementation* self);
};

struct _GXmlDomDocumentIface {
	GTypeInterface parent_iface;
	GXmlDomHTMLCollection* (*get_elements_by_tag_name) (GXmlDomDocument* self, const gchar* local_name);
	GXmlDomHTMLCollection* (*get_elements_by_tag_name_ns) (GXmlDomDocument* self, const gchar* namespace, const gchar* local_name);
	GXmlDomHTMLCollection* (*get_elements_by_class_name) (GXmlDomDocument* self, const gchar* classNames);
	GXmlDomElement* (*create_element) (GXmlDomDocument* self, const gchar* local_name, GError** error);
	GXmlDomElement* (*create_element_ns) (GXmlDomDocument* self, const gchar* namespace, const gchar* qualified_name, GError** error);
	GXmlDomDocumentFragment* (*create_document_fragment) (GXmlDomDocument* self);
	GXmlDomText* (*create_text_node) (GXmlDomDocument* self, const gchar* data, GError** error);
	GXmlDomComment* (*create_comment) (GXmlDomDocument* self, const gchar* data, GError** error);
	GXmlDomProcessingInstruction* (*create_processing_instruction) (GXmlDomDocument* self, const gchar* target, const gchar* data, GError** error);
	GXmlDomNode* (*import_node) (GXmlDomDocument* self, GXmlDomNode* node, gboolean deep, GError** error);
	GXmlDomNode* (*adopt_node) (GXmlDomDocument* self, GXmlDomNode* node, GError** error);
	GXmlDomEvent* (*create_event) (GXmlDomDocument* self, const gchar* interface, GError** error);
	GXmlDomRange* (*create_range) (GXmlDomDocument* self);
	GXmlDomNodeIterator* (*create_node_iterator) (GXmlDomDocument* self, GXmlDomNode* root, gint whatToShow, GXmlDomNodeFilter* filter);
	GXmlDomTreeWalker* (*create_tree_walker) (GXmlDomDocument* self, GXmlDomNode* root, gint what_to_show, GXmlDomNodeFilter* filter);
	void (*write_file) (GXmlDomDocument* self, GFile* file, GCancellable* cancellable, GError** error);
	void (*write_file_async) (GXmlDomDocument* self, GFile* file, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*write_file_finish) (GXmlDomDocument* self, GAsyncResult* _res_, GError** error);
	void (*write_stream) (GXmlDomDocument* self, GOutputStream* stream, GCancellable* cancellable, GError** error);
	void (*write_stream_async) (GXmlDomDocument* self, GOutputStream* stream, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*write_stream_finish) (GXmlDomDocument* self, GAsyncResult* _res_, GError** error);
	GInputStream* (*create_stream) (GXmlDomDocument* self, GError** error);
	void (*create_stream_async) (GXmlDomDocument* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GInputStream* (*create_stream_finish) (GXmlDomDocument* self, GAsyncResult* _res_, GError** error);
	gchar* (*write_string) (GXmlDomDocument* self, GCancellable* cancellable, GError** error);
	void (*write_string_async) (GXmlDomDocument* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gchar* (*write_string_finish) (GXmlDomDocument* self, GAsyncResult* _res_, GError** error);
	void (*read_from_file) (GXmlDomDocument* self, GFile* file, GCancellable* cancellable, GError** error);
	void (*read_from_file_async) (GXmlDomDocument* self, GFile* file, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_from_file_finish) (GXmlDomDocument* self, GAsyncResult* _res_, GError** error);
	void (*read_from_string) (GXmlDomDocument* self, const gchar* str, GCancellable* cancellable, GError** error);
	void (*read_from_string_async) (GXmlDomDocument* self, const gchar* str, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_from_string_finish) (GXmlDomDocument* self, GAsyncResult* _res_, GError** error);
	void (*read_from_stream) (GXmlDomDocument* self, GInputStream* stream, GCancellable* cancellable, GError** error);
	void (*read_from_stream_async) (GXmlDomDocument* self, GInputStream* stream, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*read_from_stream_finish) (GXmlDomDocument* self, GAsyncResult* _res_, GError** error);
	GXmlParser* (*get_xml_parser) (GXmlDomDocument* self);
	void (*set_xml_parser) (GXmlDomDocument* self, GXmlParser* parser);
	GXmlDomImplementation* (*get_implementation) (GXmlDomDocument* self);
	const gchar* (*get_url) (GXmlDomDocument* self);
	const gchar* (*get_document_uri) (GXmlDomDocument* self);
	const gchar* (*get_origin) (GXmlDomDocument* self);
	const gchar* (*get_compat_mode) (GXmlDomDocument* self);
	const gchar* (*get_character_set) (GXmlDomDocument* self);
	const gchar* (*get_content_type) (GXmlDomDocument* self);
	GXmlDomDocumentType* (*get_doctype) (GXmlDomDocument* self);
	GXmlDomElement* (*get_document_element) (GXmlDomDocument* self);
};

struct _GXmlDomNodeIface {
	GTypeInterface parent_iface;
	gboolean (*has_child_nodes) (GXmlDomNode* self);
	void (*normalize) (GXmlDomNode* self);
	gboolean (*is_equal_node) (GXmlDomNode* self, GXmlDomNode* node);
	GXmlDomNodeDocumentPosition (*compare_document_position) (GXmlDomNode* self, GXmlDomNode* other);
	gboolean (*contains) (GXmlDomNode* self, GXmlDomNode* other);
	gchar* (*lookup_prefix) (GXmlDomNode* self, const gchar* nspace);
	gchar* (*lookup_namespace_uri) (GXmlDomNode* self, const gchar* prefix);
	gboolean (*is_default_namespace) (GXmlDomNode* self, const gchar* nspace);
	GXmlDomNode* (*insert_before) (GXmlDomNode* self, GXmlDomNode* node, GXmlDomNode* child, GError** error);
	GXmlDomNode* (*append_child) (GXmlDomNode* self, GXmlDomNode* node, GError** error);
	GXmlDomNode* (*replace_child) (GXmlDomNode* self, GXmlDomNode* node, GXmlDomNode* child, GError** error);
	GXmlDomNode* (*remove_child) (GXmlDomNode* self, GXmlDomNode* child, GError** error);
	GXmlDomNode* (*clone_node) (GXmlDomNode* self, gboolean deep, GError** error);
	GXmlDomNodeNodeType (*get_node_type) (GXmlDomNode* self);
	gchar* (*get_node_name) (GXmlDomNode* self);
	const gchar* (*get_base_uri) (GXmlDomNode* self);
	GXmlDomDocument* (*get_owner_document) (GXmlDomNode* self);
	void (*set_owner_document) (GXmlDomNode* self, GXmlDomDocument* value);
	GXmlDomNode* (*get_parent_node) (GXmlDomNode* self);
	GXmlDomElement* (*get_parent_element) (GXmlDomNode* self);
	GXmlDomNodeList* (*get_child_nodes) (GXmlDomNode* self);
	GXmlDomNode* (*get_first_child) (GXmlDomNode* self);
	GXmlDomNode* (*get_last_child) (GXmlDomNode* self);
	GXmlDomNode* (*get_previous_sibling) (GXmlDomNode* self);
	GXmlDomNode* (*get_next_sibling) (GXmlDomNode* self);
	gchar* (*get_node_value) (GXmlDomNode* self);
	void (*set_node_value) (GXmlDomNode* self, const gchar* value);
	gchar* (*get_text_content) (GXmlDomNode* self);
	void (*set_text_content) (GXmlDomNode* self, const gchar* value);
};

struct _GXmlGNode {
	GObject parent_instance;
	GXmlGNodePrivate * priv;
	GXmlGDocument* _doc;
	xmlNode* _node;
	gchar* _base_uri;
};

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_nodes) (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);
};

struct _GXmlDocumentTypeIface {
	GTypeInterface parent_iface;
};

typedef enum  {
	GXML_DOM_ERROR_INDEX_SIZE_ERROR = 1,
	GXML_DOM_ERROR_DOMSTRING_SIZE_ERROR,
	GXML_DOM_ERROR_HIERARCHY_REQUEST_ERROR,
	GXML_DOM_ERROR_WRONG_DOCUMENT_ERROR,
	GXML_DOM_ERROR_INVALID_CHARACTER_ERROR,
	GXML_DOM_ERROR_NO_DATA_ALLOWED_ERROR,
	GXML_DOM_ERROR_NO_MODIFICATION_ALLOWED_ERROR,
	GXML_DOM_ERROR_NOT_FOUND_ERROR,
	GXML_DOM_ERROR_NOT_SUPPORTED_ERROR,
	GXML_DOM_ERROR_INUSE_ATTRIBUTE_ERROR,
	GXML_DOM_ERROR_INVALID_STATE_ERROR,
	GXML_DOM_ERROR_SYNTAX_ERROR,
	GXML_DOM_ERROR_INVALID_MODIFICATION_ERROR,
	GXML_DOM_ERROR_NAMESPACE_ERROR,
	GXML_DOM_ERROR_INVALID_ACCESS_ERROR,
	GXML_DOM_ERROR_VALIDATION_ERROR,
	GXML_DOM_ERROR_TYPE_MISMATCH_ERROR,
	GXML_DOM_ERROR_SECURITY_ERROR,
	GXML_DOM_ERROR_NETWORK_ERROR,
	GXML_DOM_ERROR_ABORT_ERROR,
	GXML_DOM_ERROR_URL_MISMATCH_ERROR,
	GXML_DOM_ERROR_QUOTA_EXCEEDED_ERROR,
	GXML_DOM_ERROR_TIME_OUT_ERROR,
	GXML_DOM_ERROR_INVALID_NODE_TYPE_ERROR,
	GXML_DOM_ERROR_DATA_CLONE_ERROR
} GXmlDomError;
#define GXML_DOM_ERROR gxml_dom_error_quark ()
struct _GXmlTextIface {
	GTypeInterface parent_iface;
	gchar* (*get_str) (GXmlText* self);
	void (*set_str) (GXmlText* self, const gchar* value);
};

struct _GXmlProcessingInstructionIface {
	GTypeInterface parent_iface;
	gchar* (*get_target) (GXmlProcessingInstruction* self);
	gchar* (*get_data) (GXmlProcessingInstruction* self);
	void (*set_data) (GXmlProcessingInstruction* self, const gchar* value);
};

struct _GXmlCommentIface {
	GTypeInterface parent_iface;
	gchar* (*get_str) (GXmlComment* self);
	void (*set_str) (GXmlComment* self, const gchar* value);
};

struct _GXmlElementIface {
	GTypeInterface parent_iface;
	void (*normalize) (GXmlElement* self);
	void (*set_attr) (GXmlElement* self, const gchar* name, const gchar* value);
	GXmlNode* (*get_attr) (GXmlElement* self, const gchar* name);
	void (*remove_attr) (GXmlElement* self, const gchar* name);
	void (*remove_ns_attr) (GXmlElement* self, const gchar* name, const gchar* uri);
	void (*set_ns_attr) (GXmlElement* self, const gchar* ns, const gchar* name, const gchar* value);
	GXmlNode* (*get_ns_attr) (GXmlElement* self, const gchar* name, const gchar* uri);
	gchar* (*get_tag_name) (GXmlElement* self);
	gchar* (*get_content) (GXmlElement* self);
	void (*set_content) (GXmlElement* self, const gchar* value);
};

static gpointer gxml_gnode_parent_class = NULL;
static GXmlDomEventTargetIface * gxml_gnode_gxml_dom_event_target_parent_iface = NULL;
static GXmlDomNodeIface * gxml_gnode_gxml_dom_node_parent_iface = NULL;
static GXmlNodeIface * gxml_gnode_gxml_node_parent_iface = NULL;

GQuark gxml_error_quark (void);
GType gxml_dom_time_stamp_get_type (void) G_GNUC_CONST;
GType gxml_dom_event_phase_get_type (void) G_GNUC_CONST;
GType gxml_dom_event_get_type (void) G_GNUC_CONST;
GType gxml_dom_event_listener_get_type (void) G_GNUC_CONST;
GType gxml_dom_event_target_get_type (void) G_GNUC_CONST;
GType gxml_dom_node_document_position_get_type (void) G_GNUC_CONST;
GType gxml_dom_node_node_type_get_type (void) G_GNUC_CONST;
GType gxml_dom_child_node_get_type (void) G_GNUC_CONST;
GType gxml_dom_non_document_type_child_node_get_type (void) G_GNUC_CONST;
GType gxml_dom_html_collection_get_type (void) G_GNUC_CONST;
GType gxml_dom_token_list_get_type (void) G_GNUC_CONST;
GType gxml_dom_named_node_map_get_type (void) G_GNUC_CONST;
GType gxml_dom_element_get_type (void) G_GNUC_CONST;
GType gxml_dom_node_list_get_type (void) G_GNUC_CONST;
GType gxml_dom_element_list_get_type (void) G_GNUC_CONST;
GType gxml_dom_parent_node_get_type (void) G_GNUC_CONST;
GType gxml_dom_non_element_parent_node_get_type (void) G_GNUC_CONST;
GType gxml_dom_document_fragment_get_type (void) G_GNUC_CONST;
GType gxml_dom_character_data_get_type (void) G_GNUC_CONST;
GType gxml_dom_text_get_type (void) G_GNUC_CONST;
GType gxml_dom_comment_get_type (void) G_GNUC_CONST;
GType gxml_dom_processing_instruction_get_type (void) G_GNUC_CONST;
GType gxml_dom_range_boundary_points_get_type (void) G_GNUC_CONST;
GType gxml_dom_range_get_type (void) G_GNUC_CONST;
GType gxml_dom_node_filter_get_type (void) G_GNUC_CONST;
GType gxml_dom_node_iterator_get_type (void) G_GNUC_CONST;
GType gxml_dom_tree_walker_get_type (void) G_GNUC_CONST;
GType gxml_parser_get_type (void) G_GNUC_CONST;
GType gxml_dom_document_type_get_type (void) G_GNUC_CONST;
GType gxml_dom_xml_document_get_type (void) G_GNUC_CONST;
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_node_get_type (void) G_GNUC_CONST;
GType gxml_document_get_type (void) G_GNUC_CONST;
GType gxml_dom_implementation_get_type (void) G_GNUC_CONST;
GType gxml_dom_document_get_type (void) G_GNUC_CONST;
GType gxml_dom_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;
gchar* gxml_gnode_libxml2_error_to_string (xmlError* e);
const gchar* xml_error_level_to_string (xmlErrorLevel self);
static const char* _xml_error_level_to_string (xmlErrorLevel 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_gchild_node_get_type (void) G_GNUC_CONST;
GType gxml_gnon_document_child_node_get_type (void) G_GNUC_CONST;
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_gcharacter_data_get_type (void) G_GNUC_CONST;
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);
static gboolean gxml_gnode_real_has_child_nodes (GXmlDomNode* base);
GeeBidirList* gxml_gnode_get_children_nodes (GXmlGNode* self);
static void gxml_gnode_real_normalize (GXmlDomNode* base);
GXmlDomNodeList* gxml_dom_node_get_child_nodes (GXmlDomNode* self);
static GXmlDomNode* gxml_gnode_real_clone_node (GXmlDomNode* base,
                                         gboolean deep,
                                         GError** error);
static gboolean gxml_gnode_real_is_equal_node (GXmlDomNode* base,
                                        GXmlDomNode* node);
GeeBidirList* gxml_node_get_children_nodes (GXmlNode* self);
GeeMap* gxml_gnode_get_attrs (GXmlGNode* self);
GeeMap* gxml_node_get_attrs (GXmlNode* self);
gchar* gxml_node_get_name (GXmlNode* self);
gchar* gxml_node_get_value (GXmlNode* self);
gboolean gxml_dom_node_is_equal_node (GXmlDomNode* self,
                                      GXmlDomNode* node);
static GXmlDomNodeDocumentPosition gxml_gnode_real_compare_document_position (GXmlDomNode* base,
                                                                       GXmlDomNode* other);
GXmlDocument* gxml_gnode_get_document (GXmlGNode* self);
GXmlDocument* gxml_node_get_document (GXmlNode* self);
GXmlDomNode* gxml_dom_node_get_parent_node (GXmlDomNode* self);
gboolean gxml_dom_node_contains (GXmlDomNode* self,
                                 GXmlDomNode* other);
static gboolean gxml_gnode_real_contains (GXmlDomNode* base,
                                   GXmlDomNode* other);
static gchar* gxml_gnode_real_lookup_prefix (GXmlDomNode* base,
                                      const gchar* nspace);
GXmlNode* gxml_gnode_get_parent (GXmlGNode* self);
GType gxml_document_type_get_type (void) G_GNUC_CONST;
static gchar* gxml_gnode_real_lookup_namespace_uri (GXmlDomNode* base,
                                             const gchar* prefix);
static gboolean gxml_gnode_real_is_default_namespace (GXmlDomNode* base,
                                               const gchar* nspace);
gchar* gxml_dom_node_lookup_namespace_uri (GXmlDomNode* self,
                                           const gchar* prefix);
static GXmlDomNode* gxml_gnode_real_insert_before (GXmlDomNode* base,
                                            GXmlDomNode* node,
                                            GXmlDomNode* child,
                                            GError** error);
GQuark gxml_dom_error_quark (void);
static GXmlDomNode* gxml_gnode_real_append_child (GXmlDomNode* base,
                                           GXmlDomNode* node,
                                           GError** error);
GXmlDomNode* gxml_dom_node_insert_before (GXmlDomNode* self,
                                          GXmlDomNode* node,
                                          GXmlDomNode* child,
                                          GError** error);
static GXmlDomNode* gxml_gnode_real_replace_child (GXmlDomNode* base,
                                            GXmlDomNode* node,
                                            GXmlDomNode* child,
                                            GError** error);
static GXmlDomNode* gxml_gnode_real_remove_child (GXmlDomNode* base,
                                           GXmlDomNode* child,
                                           GError** error);
static void gxml_gnode_real_add_event_listener (GXmlDomEventTarget* base,
                                         const gchar* type,
                                         GXmlDomEventListener* callback,
                                         gboolean capture);
static void gxml_gnode_real_remove_event_listener (GXmlDomEventTarget* base,
                                            const gchar* type,
                                            GXmlDomEventListener* callback,
                                            gboolean capture);
static gboolean gxml_gnode_real_dispatch_event (GXmlDomEventTarget* base,
                                         GXmlDomEvent* event,
                                         GError** error);
GXmlGNode* gxml_gnode_construct (GType object_type);
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;
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;
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);
GType gxml_text_get_type (void) G_GNUC_CONST;
GType gxml_processing_instruction_get_type (void) G_GNUC_CONST;
GType gxml_comment_get_type (void) G_GNUC_CONST;
GType gxml_element_get_type (void) G_GNUC_CONST;
GXmlNode* gxml_document_create_text (GXmlDocument* self,
                                     const gchar* text);
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);
GXmlDomNodeNodeType gxml_dom_node_get_node_type (GXmlDomNode* self);
gchar* gxml_dom_node_get_node_name (GXmlDomNode* self);
const gchar* gxml_dom_node_get_base_uri (GXmlDomNode* self);
GXmlDomDocument* gxml_dom_node_get_owner_document (GXmlDomNode* self);
GXmlDomElement* gxml_dom_node_get_parent_element (GXmlDomNode* self);
GXmlDomNode* gxml_dom_node_get_first_child (GXmlDomNode* self);
GXmlDomNode* gxml_dom_node_get_last_child (GXmlDomNode* self);
GXmlDomNode* gxml_dom_node_get_previous_sibling (GXmlDomNode* self);
GXmlDomNode* gxml_dom_node_get_next_sibling (GXmlDomNode* self);
gchar* gxml_dom_node_get_node_value (GXmlDomNode* self);
gchar* gxml_dom_node_get_text_content (GXmlDomNode* self);
static void _vala_gxml_gnode_get_property (GObject * object,
                                    guint property_id,
                                    GValue * value,
                                    GParamSpec * pspec);
void gxml_dom_node_set_owner_document (GXmlDomNode* self,
                                       GXmlDomDocument* value);
void gxml_dom_node_set_node_value (GXmlDomNode* self,
                                   const gchar* value);
void gxml_dom_node_set_text_content (GXmlDomNode* self,
                                     const gchar* value);
static void _vala_gxml_gnode_set_property (GObject * object,
                                    guint property_id,
                                    const GValue * value,
                                    GParamSpec * pspec);

GQuark
gxml_error_quark (void)
{
	return g_quark_from_static_string ("gxml-error-quark");
}

static const char*
_xml_error_level_to_string (xmlErrorLevel value)
{
	switch (value) {
		case XML_ERR_NONE:
		return "XML_ERR_NONE";
		case XML_ERR_WARNING:
		return "XML_ERR_WARNING";
		case XML_ERR_ERROR:
		return "XML_ERR_ERROR";
		case XML_ERR_FATAL:
		return "XML_ERR_FATAL";
	}
	return NULL;
}

static gchar*
string_replace (const gchar* self,
                const gchar* old,
                const gchar* replacement)
{
	gchar* result = NULL;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = (*((gchar*) old)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (old, replacement) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (self);
		result = _tmp2_;
		return result;
	}
	{
		GRegex* regex = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp3_ = g_regex_escape_string (old, -1);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error0_);
		_tmp6_ = _tmp5_;
		_g_free0 (_tmp4_);
		regex = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch12_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp8_ = regex;
		_tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch12_g_regex_error;
			}
			_g_regex_unref0 (regex);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp10_ = _tmp7_;
		_tmp7_ = NULL;
		result = _tmp10_;
		_g_free0 (_tmp7_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally12;
	__catch12_g_regex_error:
	{
		GError* e = NULL;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__finally12:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return NULL;
	}
}

gchar*
gxml_gnode_libxml2_error_to_string (xmlError* e)
{
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_;
	xmlErrorLevel _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	_tmp1_ = (*e).file;
	if (_tmp1_ == NULL) {
		_tmp0_ = "<io>";
	} else {
		const gchar* _tmp2_;
		_tmp2_ = (*e).file;
		_tmp0_ = _tmp2_;
	}
	_tmp3_ = (*e).level;
	_tmp4_ = _xml_error_level_to_string (_tmp3_);
	_tmp5_ = string_replace (_tmp4_, "XML_ERR_", "");
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strdup_printf ("%i", (*e).domain);
	_tmp8_ = _tmp7_;
	_tmp9_ = string_replace (_tmp8_, "XML_FROM_", "");
	_tmp10_ = _tmp9_;
	_tmp11_ = (*e).message;
	_tmp12_ = g_strdup_printf (_ ("%s:%s:%d: %s:%d: %s"), _tmp6_, _tmp10_, (*e).code, _tmp0_, (*e).line, _tmp11_);
	_tmp13_ = _tmp12_;
	_g_free0 (_tmp10_);
	_g_free0 (_tmp8_);
	_g_free0 (_tmp6_);
	result = _tmp13_;
	return result;
}

static gboolean
gxml_gnode_real_set_namespace (GXmlGNode* self,
                               const gchar* uri,
                               const gchar* prefix)
{
	gboolean result = FALSE;
	xmlNode* _tmp0_;
	xmlNode* _tmp1_;
	xmlNs* _tmp2_;
	g_return_val_if_fail (uri != NULL, FALSE);
	_tmp0_ = self->_node;
	if (_tmp0_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp1_ = self->_node;
	_tmp2_ = xmlNewNs (_tmp1_, (xmlChar*) uri, (xmlChar*) prefix);
	result = _tmp2_ != 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;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	_tmp0_ = g_type_name (G_TYPE_FROM_INSTANCE ((GObject*) self));
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	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_;
	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;
	GXmlNode* nullnode = NULL;
	GXmlNodeType t = 0;
	xmlElementType _tmp0_;
	GXmlNodeType _tmp1_;
	g_return_val_if_fail (doc != NULL, NULL);
	nullnode = NULL;
	_tmp0_ = node->type;
	t = (GXmlNodeType) _tmp0_;
	_tmp1_ = t;
	switch (_tmp1_) {
		case GXML_NODE_TYPE_ELEMENT:
		{
			GXmlGElement* _tmp2_;
			_tmp2_ = gxml_gelement_new (doc, node);
			result = (GXmlNode*) _tmp2_;
			_g_object_unref0 (nullnode);
			return result;
		}
		case GXML_NODE_TYPE_ATTRIBUTE:
		{
			GXmlGAttribute* _tmp3_;
			_tmp3_ = gxml_gattribute_new (doc, (xmlAttr*) node);
			result = (GXmlNode*) _tmp3_;
			_g_object_unref0 (nullnode);
			return result;
		}
		case GXML_NODE_TYPE_TEXT:
		{
			GXmlGText* _tmp4_;
			_tmp4_ = gxml_gtext_new (doc, node);
			result = (GXmlNode*) _tmp4_;
			_g_object_unref0 (nullnode);
			return result;
		}
		case GXML_NODE_TYPE_CDATA_SECTION:
		{
			GXmlGCDATA* _tmp5_;
			_tmp5_ = gxml_gcdata_new (doc, node);
			result = (GXmlNode*) _tmp5_;
			_g_object_unref0 (nullnode);
			return result;
		}
		case GXML_NODE_TYPE_ENTITY_REFERENCE:
		{
			result = nullnode;
			return result;
		}
		case GXML_NODE_TYPE_ENTITY:
		{
			result = nullnode;
			return result;
		}
		case GXML_NODE_TYPE_PROCESSING_INSTRUCTION:
		{
			GXmlGProcessingInstruction* _tmp6_;
			_tmp6_ = gxml_gprocessing_instruction_new (doc, node);
			result = (GXmlNode*) _tmp6_;
			_g_object_unref0 (nullnode);
			return result;
		}
		case GXML_NODE_TYPE_COMMENT:
		{
			GXmlGComment* _tmp7_;
			_tmp7_ = gxml_gcomment_new (doc, node);
			result = (GXmlNode*) _tmp7_;
			_g_object_unref0 (nullnode);
			return result;
		}
		case GXML_NODE_TYPE_DOCUMENT:
		{
			xmlDoc* _tmp8_;
			GXmlGDocument* _tmp9_;
			_tmp8_ = node->doc;
			_tmp9_ = gxml_gdocument_new_from_doc (_tmp8_);
			result = (GXmlNode*) _tmp9_;
			_g_object_unref0 (nullnode);
			return result;
		}
		case GXML_NODE_TYPE_DOCUMENT_TYPE:
		{
			result = nullnode;
			return result;
		}
		case GXML_NODE_TYPE_DOCUMENT_FRAGMENT:
		{
			result = nullnode;
			return result;
		}
		case GXML_NODE_TYPE_NOTATION:
		{
			result = nullnode;
			return result;
		}
		default:
		break;
	}
	result = nullnode;
	return result;
}

static gboolean
gxml_gnode_real_has_child_nodes (GXmlDomNode* base)
{
	GXmlGNode * self;
	gboolean result = FALSE;
	GeeBidirList* _tmp0_;
	GeeBidirList* _tmp1_;
	GeeBidirList* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gboolean _tmp5_;
	self = (GXmlGNode*) base;
	_tmp0_ = gxml_gnode_get_children_nodes (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_ > 0;
	_g_object_unref0 (_tmp2_);
	result = _tmp5_;
	return result;
}

static void
gxml_gnode_real_normalize (GXmlDomNode* base)
{
	GXmlGNode * self;
	self = (GXmlGNode*) base;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				GeeBidirList* _tmp2_;
				GeeBidirList* _tmp3_;
				GeeBidirList* _tmp4_;
				gint _tmp5_;
				gint _tmp6_;
				gboolean _tmp7_;
				GXmlNode* n = NULL;
				GeeBidirList* _tmp8_;
				GeeBidirList* _tmp9_;
				GeeBidirList* _tmp10_;
				gpointer _tmp11_;
				GXmlNode* _tmp12_;
				GXmlNode* _tmp13_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = gxml_gnode_get_children_nodes (self);
				_tmp3_ = _tmp2_;
				_tmp4_ = _tmp3_;
				_tmp5_ = gee_collection_get_size ((GeeCollection*) _tmp4_);
				_tmp6_ = _tmp5_;
				_tmp7_ = !(i < _tmp6_);
				_g_object_unref0 (_tmp4_);
				if (_tmp7_) {
					break;
				}
				_tmp8_ = gxml_gnode_get_children_nodes (self);
				_tmp9_ = _tmp8_;
				_tmp10_ = _tmp9_;
				_tmp11_ = gee_list_get ((GeeList*) _tmp10_, i);
				_tmp12_ = (GXmlNode*) _tmp11_;
				_g_object_unref0 (_tmp10_);
				n = _tmp12_;
				_tmp13_ = n;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, GXML_TYPE_DOM_TEXT)) {
					GXmlDomNodeList* _tmp14_;
					GXmlDomNodeList* _tmp15_;
					GXmlDomNodeList* _tmp16_;
					gpointer _tmp17_;
					GXmlDomNode* _tmp18_;
					_tmp14_ = gxml_dom_node_get_child_nodes ((GXmlDomNode*) self);
					_tmp15_ = _tmp14_;
					_tmp16_ = _tmp15_;
					_tmp17_ = gee_list_remove_at ((GeeList*) _tmp16_, i);
					_tmp18_ = (GXmlDomNode*) _tmp17_;
					_g_object_unref0 (_tmp18_);
					_g_object_unref0 (_tmp16_);
				}
				_g_object_unref0 (n);
			}
		}
	}
}

static GXmlDomNode*
gxml_gnode_real_clone_node (GXmlDomNode* base,
                            gboolean deep,
                            GError** error)
{
	GXmlGNode * self;
	GXmlDomNode* result = NULL;
	GXmlDomNode* nullnode = NULL;
	xmlNode* n = NULL;
	xmlNode* _tmp4_;
	GXmlGDocument* _tmp5_;
	xmlNode* _tmp6_;
	GXmlNode* _tmp7_;
	self = (GXmlGNode*) base;
	nullnode = NULL;
	n = NULL;
	if (deep) {
		xmlNode* _tmp0_;
		xmlNode* _tmp1_;
		_tmp0_ = self->_node;
		_tmp1_ = xmlCopyNode (_tmp0_, 1);
		n = _tmp1_;
	} else {
		xmlNode* _tmp2_;
		xmlNode* _tmp3_;
		_tmp2_ = self->_node;
		_tmp3_ = xmlCopyNode (_tmp2_, 2);
		n = _tmp3_;
	}
	_tmp4_ = n;
	if (_tmp4_ == NULL) {
		result = nullnode;
		return result;
	}
	_tmp5_ = self->_doc;
	_tmp6_ = n;
	_tmp7_ = gxml_gnode_to_gnode (_tmp5_, _tmp6_);
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GXML_TYPE_DOM_NODE, GXmlDomNode);
	_g_object_unref0 (nullnode);
	return result;
}

static gboolean
gxml_gnode_real_is_equal_node (GXmlDomNode* base,
                               GXmlDomNode* node)
{
	GXmlGNode * self;
	gboolean result = FALSE;
	GeeBidirList* _tmp0_;
	GeeBidirList* _tmp1_;
	GeeBidirList* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	GeeBidirList* _tmp5_;
	GeeBidirList* _tmp6_;
	GeeBidirList* _tmp7_;
	gint _tmp8_;
	gint _tmp9_;
	gboolean _tmp10_;
	self = (GXmlGNode*) base;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_NODE)) {
		result = FALSE;
		return result;
	}
	if (node == NULL) {
		result = FALSE;
		return result;
	}
	_tmp0_ = gxml_gnode_get_children_nodes (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = gxml_node_get_children_nodes (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_NODE) ? ((GXmlNode*) node) : NULL);
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp6_;
	_tmp8_ = gee_collection_get_size ((GeeCollection*) _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = _tmp4_ != _tmp9_;
	_g_object_unref0 (_tmp7_);
	_g_object_unref0 (_tmp2_);
	if (_tmp10_) {
		result = FALSE;
		return result;
	}
	{
		GeeIterator* _a_it = NULL;
		GeeMap* _tmp11_;
		GeeMap* _tmp12_;
		GeeMap* _tmp13_;
		GeeCollection* _tmp14_;
		GeeCollection* _tmp15_;
		GeeCollection* _tmp16_;
		GeeIterator* _tmp17_;
		GeeIterator* _tmp18_;
		_tmp11_ = gxml_gnode_get_attrs (self);
		_tmp12_ = _tmp11_;
		_tmp13_ = _tmp12_;
		_tmp14_ = gee_map_get_values (_tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = _tmp15_;
		_tmp17_ = gee_iterable_iterator ((GeeIterable*) _tmp16_);
		_tmp18_ = _tmp17_;
		_g_object_unref0 (_tmp16_);
		_g_object_unref0 (_tmp13_);
		_a_it = _tmp18_;
		while (TRUE) {
			GeeIterator* _tmp19_;
			GXmlNode* a = NULL;
			GeeIterator* _tmp20_;
			gpointer _tmp21_;
			GeeMap* _tmp22_;
			GeeMap* _tmp23_;
			GeeMap* _tmp24_;
			GXmlNode* _tmp25_;
			gchar* _tmp26_;
			gchar* _tmp27_;
			gchar* _tmp28_;
			gboolean _tmp29_;
			GXmlNode* _tmp30_;
			gchar* _tmp31_;
			gchar* _tmp32_;
			gchar* _tmp33_;
			GeeMap* _tmp34_;
			GeeMap* _tmp35_;
			GeeMap* _tmp36_;
			GXmlNode* _tmp37_;
			gchar* _tmp38_;
			gchar* _tmp39_;
			gchar* _tmp40_;
			gpointer _tmp41_;
			GXmlNode* _tmp42_;
			gchar* _tmp43_;
			gchar* _tmp44_;
			gchar* _tmp45_;
			gboolean _tmp46_;
			_tmp19_ = _a_it;
			if (!gee_iterator_next (_tmp19_)) {
				break;
			}
			_tmp20_ = _a_it;
			_tmp21_ = gee_iterator_get (_tmp20_);
			a = (GXmlNode*) _tmp21_;
			_tmp22_ = gxml_node_get_attrs (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_NODE) ? ((GXmlNode*) node) : NULL);
			_tmp23_ = _tmp22_;
			_tmp24_ = _tmp23_;
			_tmp25_ = a;
			_tmp26_ = gxml_node_get_name (_tmp25_);
			_tmp27_ = _tmp26_;
			_tmp28_ = _tmp27_;
			_tmp29_ = !gee_map_has_key (_tmp24_, _tmp28_);
			_g_free0 (_tmp28_);
			_g_object_unref0 (_tmp24_);
			if (_tmp29_) {
				result = FALSE;
				_g_object_unref0 (a);
				_g_object_unref0 (_a_it);
				return result;
			}
			_tmp30_ = a;
			_tmp31_ = gxml_node_get_value (_tmp30_);
			_tmp32_ = _tmp31_;
			_tmp33_ = _tmp32_;
			_tmp34_ = gxml_node_get_attrs (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_NODE) ? ((GXmlNode*) node) : NULL);
			_tmp35_ = _tmp34_;
			_tmp36_ = _tmp35_;
			_tmp37_ = a;
			_tmp38_ = gxml_node_get_name (_tmp37_);
			_tmp39_ = _tmp38_;
			_tmp40_ = _tmp39_;
			_tmp41_ = gee_map_get (_tmp36_, _tmp40_);
			_tmp42_ = (GXmlNode*) _tmp41_;
			_tmp43_ = gxml_node_get_value (_tmp42_);
			_tmp44_ = _tmp43_;
			_tmp45_ = _tmp44_;
			_tmp46_ = g_strcmp0 (_tmp33_, _tmp45_) != 0;
			_g_free0 (_tmp45_);
			_g_object_unref0 (_tmp42_);
			_g_free0 (_tmp40_);
			_g_object_unref0 (_tmp36_);
			_g_free0 (_tmp33_);
			if (_tmp46_) {
				result = FALSE;
				_g_object_unref0 (a);
				_g_object_unref0 (_a_it);
				return result;
			}
			_g_object_unref0 (a);
		}
		_g_object_unref0 (_a_it);
	}
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp47_ = FALSE;
			_tmp47_ = TRUE;
			while (TRUE) {
				GeeBidirList* _tmp49_;
				GeeBidirList* _tmp50_;
				GeeBidirList* _tmp51_;
				gint _tmp52_;
				gint _tmp53_;
				gboolean _tmp54_;
				GeeBidirList* _tmp55_;
				GeeBidirList* _tmp56_;
				GeeBidirList* _tmp57_;
				gpointer _tmp58_;
				GXmlNode* _tmp59_;
				GXmlDomNode* _tmp60_;
				GXmlDomNode* _tmp61_;
				GeeBidirList* _tmp62_;
				GeeBidirList* _tmp63_;
				GeeBidirList* _tmp64_;
				gpointer _tmp65_;
				GXmlNode* _tmp66_;
				GXmlDomNode* _tmp67_;
				GXmlDomNode* _tmp68_;
				gboolean _tmp69_;
				if (!_tmp47_) {
					gint _tmp48_;
					_tmp48_ = i;
					i = _tmp48_ + 1;
				}
				_tmp47_ = FALSE;
				_tmp49_ = gxml_gnode_get_children_nodes (self);
				_tmp50_ = _tmp49_;
				_tmp51_ = _tmp50_;
				_tmp52_ = gee_collection_get_size ((GeeCollection*) _tmp51_);
				_tmp53_ = _tmp52_;
				_tmp54_ = !(i < _tmp53_);
				_g_object_unref0 (_tmp51_);
				if (_tmp54_) {
					break;
				}
				_tmp55_ = gxml_gnode_get_children_nodes (self);
				_tmp56_ = _tmp55_;
				_tmp57_ = _tmp56_;
				_tmp58_ = gee_list_get ((GeeList*) _tmp57_, i);
				_tmp59_ = (GXmlNode*) _tmp58_;
				_tmp60_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp59_, GXML_TYPE_DOM_NODE) ? ((GXmlDomNode*) _tmp59_) : NULL;
				if (_tmp60_ == NULL) {
					_g_object_unref0 (_tmp59_);
				}
				_tmp61_ = _tmp60_;
				_tmp62_ = gxml_node_get_children_nodes (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_NODE) ? ((GXmlNode*) node) : NULL);
				_tmp63_ = _tmp62_;
				_tmp64_ = _tmp63_;
				_tmp65_ = gee_list_get ((GeeList*) _tmp64_, i);
				_tmp66_ = (GXmlNode*) _tmp65_;
				_tmp67_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp66_, GXML_TYPE_DOM_NODE) ? ((GXmlDomNode*) _tmp66_) : NULL;
				if (_tmp67_ == NULL) {
					_g_object_unref0 (_tmp66_);
				}
				_tmp68_ = _tmp67_;
				_tmp69_ = !gxml_dom_node_is_equal_node (_tmp61_, _tmp68_);
				_g_object_unref0 (_tmp68_);
				_g_object_unref0 (_tmp64_);
				_g_object_unref0 (_tmp61_);
				_g_object_unref0 (_tmp57_);
				if (_tmp69_) {
					result = FALSE;
					return result;
				}
			}
		}
	}
	result = TRUE;
	return result;
}

static GXmlDomNodeDocumentPosition
gxml_gnode_real_compare_document_position (GXmlDomNode* base,
                                           GXmlDomNode* other)
{
	GXmlGNode * self;
	GXmlDomNodeDocumentPosition result = 0U;
	gboolean _tmp0_ = FALSE;
	GXmlDocument* _tmp1_;
	GXmlDocument* _tmp2_;
	GXmlDocument* _tmp3_;
	GXmlDocument* _tmp4_;
	GXmlDomNode* _tmp10_;
	GXmlDomNode* _tmp11_;
	GXmlDomNode* _tmp12_;
	gboolean _tmp13_;
	self = (GXmlGNode*) base;
	g_return_val_if_fail (other != NULL, 0U);
	if ((G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_DOM_NODE) ? ((GXmlDomNode*) self) : NULL) == other) {
		result = GXML_DOM_NODE_DOCUMENT_POSITION_NONE;
		return result;
	}
	_tmp1_ = gxml_gnode_get_document (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = gxml_node_get_document (G_TYPE_CHECK_INSTANCE_TYPE (other, GXML_TYPE_NODE) ? ((GXmlNode*) other) : NULL);
	_tmp4_ = _tmp3_;
	if (_tmp2_ != _tmp4_) {
		_tmp0_ = TRUE;
	} else {
		GXmlDomNode* _tmp5_;
		GXmlDomNode* _tmp6_;
		GXmlDomNode* _tmp7_;
		_tmp5_ = gxml_dom_node_get_parent_node (other);
		_tmp6_ = _tmp5_;
		_tmp7_ = _tmp6_;
		_tmp0_ = _tmp7_ == NULL;
		_g_object_unref0 (_tmp7_);
	}
	if (_tmp0_) {
		GXmlDomNodeDocumentPosition p = 0U;
		p = GXML_DOM_NODE_DOCUMENT_POSITION_DISCONNECTED & GXML_DOM_NODE_DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC;
		if ((&self) > (&other)) {
			GXmlDomNodeDocumentPosition _tmp8_;
			_tmp8_ = p;
			p = _tmp8_ & GXML_DOM_NODE_DOCUMENT_POSITION_PRECEDING;
		} else {
			GXmlDomNodeDocumentPosition _tmp9_;
			_tmp9_ = p;
			p = _tmp9_ & GXML_DOM_NODE_DOCUMENT_POSITION_FOLLOWING;
		}
		result = p;
		return result;
	}
	if (gxml_dom_node_contains (G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_DOM_NODE) ? ((GXmlDomNode*) self) : NULL, other)) {
		result = GXML_DOM_NODE_DOCUMENT_POSITION_CONTAINED_BY & GXML_DOM_NODE_DOCUMENT_POSITION_FOLLOWING;
		return result;
	}
	_tmp10_ = gxml_dom_node_get_parent_node ((GXmlDomNode*) self);
	_tmp11_ = _tmp10_;
	_tmp12_ = _tmp11_;
	_tmp13_ = gxml_dom_node_contains (_tmp12_, other);
	_g_object_unref0 (_tmp12_);
	if (_tmp13_) {
		GXmlDomNode* par = NULL;
		GXmlDomNode* _tmp14_;
		GXmlDomNode* _tmp15_;
		GXmlDomNode* _tmp16_;
		GXmlDomNodeList* _tmp17_;
		GXmlDomNodeList* _tmp18_;
		GXmlDomNodeList* _tmp19_;
		GXmlDomNode* _tmp20_;
		GXmlDomNodeList* _tmp21_;
		GXmlDomNodeList* _tmp22_;
		GXmlDomNodeList* _tmp23_;
		gboolean _tmp24_;
		_tmp14_ = gxml_dom_node_get_parent_node ((GXmlDomNode*) self);
		_tmp15_ = _tmp14_;
		par = _tmp15_;
		_tmp16_ = par;
		_tmp17_ = gxml_dom_node_get_child_nodes (_tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = _tmp18_;
		_tmp20_ = par;
		_tmp21_ = gxml_dom_node_get_child_nodes (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = _tmp22_;
		_tmp24_ = gee_list_index_of ((GeeList*) _tmp19_, (GXmlDomNode*) self) > gee_list_index_of ((GeeList*) _tmp23_, other);
		_g_object_unref0 (_tmp23_);
		_g_object_unref0 (_tmp19_);
		if (_tmp24_) {
			result = GXML_DOM_NODE_DOCUMENT_POSITION_PRECEDING;
			_g_object_unref0 (par);
			return result;
		} else {
			result = GXML_DOM_NODE_DOCUMENT_POSITION_FOLLOWING;
			_g_object_unref0 (par);
			return result;
		}
		_g_object_unref0 (par);
	}
	if (gxml_dom_node_contains (other, (GXmlDomNode*) self)) {
		result = GXML_DOM_NODE_DOCUMENT_POSITION_CONTAINS & GXML_DOM_NODE_DOCUMENT_POSITION_PRECEDING;
		return result;
	}
	g_warning ("GXmlNode.vala:278: %s", _ ("Can't find node position"));
	result = GXML_DOM_NODE_DOCUMENT_POSITION_NONE;
	return result;
}

static gboolean
gxml_gnode_real_contains (GXmlDomNode* base,
                          GXmlDomNode* other)
{
	GXmlGNode * self;
	gboolean result = FALSE;
	GXmlDomNodeList* _tmp0_;
	GXmlDomNodeList* _tmp1_;
	GXmlDomNodeList* _tmp2_;
	gboolean _tmp3_;
	self = (GXmlGNode*) base;
	if (other == NULL) {
		result = FALSE;
		return result;
	}
	_tmp0_ = gxml_dom_node_get_child_nodes ((GXmlDomNode*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_collection_contains ((GeeCollection*) _tmp2_, other);
	_g_object_unref0 (_tmp2_);
	result = _tmp3_;
	return result;
}

static gchar*
gxml_gnode_real_lookup_prefix (GXmlDomNode* base,
                               const gchar* nspace)
{
	GXmlGNode * self;
	gchar* result = NULL;
	xmlNode* _tmp0_;
	GXmlNode* _tmp1_;
	GXmlNode* _tmp2_;
	GXmlNode* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_ = FALSE;
	xmlNs* ns = NULL;
	xmlNode* _tmp6_;
	xmlDoc* _tmp7_;
	xmlNode* _tmp8_;
	xmlNs* _tmp9_;
	xmlNs* _tmp10_;
	xmlNs* _tmp11_;
	const gchar* _tmp12_;
	gchar* _tmp13_;
	self = (GXmlGNode*) base;
	_tmp0_ = self->_node;
	if (_tmp0_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp1_ = gxml_gnode_get_parent (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_ == NULL;
	_g_object_unref0 (_tmp3_);
	if (_tmp4_) {
		result = NULL;
		return result;
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_DOCUMENT_TYPE)) {
		_tmp5_ = TRUE;
	} else {
		_tmp5_ = G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_DOM_DOCUMENT_FRAGMENT);
	}
	if (_tmp5_) {
		result = NULL;
		return result;
	}
	_tmp6_ = self->_node;
	_tmp7_ = _tmp6_->doc;
	_tmp8_ = self->_node;
	_tmp9_ = xmlSearchNsByHref (_tmp7_, _tmp8_, nspace);
	ns = _tmp9_;
	_tmp10_ = ns;
	if (_tmp10_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp11_ = ns;
	_tmp12_ = _tmp11_->prefix;
	_tmp13_ = g_strdup (_tmp12_);
	result = _tmp13_;
	return result;
}

static gchar*
gxml_gnode_real_lookup_namespace_uri (GXmlDomNode* base,
                                      const gchar* prefix)
{
	GXmlGNode * self;
	gchar* result = NULL;
	gboolean _tmp0_ = FALSE;
	xmlNs* ns = NULL;
	xmlNode* _tmp1_;
	xmlDoc* _tmp2_;
	xmlNode* _tmp3_;
	xmlNs* _tmp4_;
	xmlNs* _tmp5_;
	xmlNs* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	self = (GXmlGNode*) base;
	if (G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_DOCUMENT_TYPE)) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_DOM_DOCUMENT_FRAGMENT);
	}
	if (_tmp0_) {
		result = NULL;
		return result;
	}
	_tmp1_ = self->_node;
	_tmp2_ = _tmp1_->doc;
	_tmp3_ = self->_node;
	_tmp4_ = xmlSearchNs (_tmp2_, _tmp3_, prefix);
	ns = _tmp4_;
	_tmp5_ = ns;
	if (_tmp5_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp6_ = ns;
	_tmp7_ = _tmp6_->href;
	_tmp8_ = g_strdup (_tmp7_);
	result = _tmp8_;
	return result;
}

static gboolean
gxml_gnode_real_is_default_namespace (GXmlDomNode* base,
                                      const gchar* nspace)
{
	GXmlGNode * self;
	gboolean result = FALSE;
	gchar* ns = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	self = (GXmlGNode*) base;
	if (nspace == NULL) {
		result = FALSE;
		return result;
	}
	_tmp0_ = gxml_dom_node_lookup_namespace_uri ((GXmlDomNode*) self, NULL);
	ns = _tmp0_;
	_tmp1_ = ns;
	if (g_strcmp0 (_tmp1_, nspace) == 0) {
		result = TRUE;
		_g_free0 (ns);
		return result;
	}
	result = FALSE;
	_g_free0 (ns);
	return result;
}

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

static GXmlDomNode*
gxml_gnode_real_insert_before (GXmlDomNode* base,
                               GXmlDomNode* node,
                               GXmlDomNode* child,
                               GError** error)
{
	GXmlGNode * self;
	GXmlDomNode* result = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_ = FALSE;
	GeeBidirList* _tmp24_;
	GeeBidirList* _tmp25_;
	GeeBidirList* _tmp26_;
	GXmlDomNode* _tmp27_;
	GError* _inner_error0_ = NULL;
	self = (GXmlGNode*) base;
	g_return_val_if_fail (node != NULL, NULL);
	if (!G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_GNODE)) {
		GError* _tmp0_;
		_tmp0_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_INVALID_NODE_TYPE_ERROR, _ ("Invalid attempt to add invalid node type"));
		_inner_error0_ = _tmp0_;
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	if (child != NULL) {
		_tmp1_ = !gxml_dom_node_contains ((GXmlDomNode*) self, child);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GError* _tmp2_;
		_tmp2_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_NOT_FOUND_ERROR, _ ("Can't find child to insert node before"));
		_inner_error0_ = _tmp2_;
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_DOM_DOCUMENT)) {
		_tmp4_ = TRUE;
	} else {
		_tmp4_ = G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_DOM_ELEMENT);
	}
	if (_tmp4_) {
		_tmp3_ = TRUE;
	} else {
		_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_DOM_DOCUMENT_FRAGMENT);
	}
	if (!_tmp3_) {
		GError* _tmp5_;
		_tmp5_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_HIERARCHY_REQUEST_ERROR, _ ("Invalid attempt to insert a node"));
		_inner_error0_ = _tmp5_;
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_DOCUMENT_FRAGMENT)) {
		_tmp10_ = TRUE;
	} else {
		_tmp10_ = G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_DOCUMENT_TYPE);
	}
	if (_tmp10_) {
		_tmp9_ = TRUE;
	} else {
		_tmp9_ = G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_ELEMENT);
	}
	if (_tmp9_) {
		_tmp8_ = TRUE;
	} else {
		_tmp8_ = G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_TEXT);
	}
	if (_tmp8_) {
		_tmp7_ = TRUE;
	} else {
		_tmp7_ = G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_PROCESSING_INSTRUCTION);
	}
	if (_tmp7_) {
		_tmp6_ = TRUE;
	} else {
		_tmp6_ = G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_COMMENT);
	}
	if (!_tmp6_) {
		GError* _tmp11_;
		_tmp11_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_HIERARCHY_REQUEST_ERROR, _ ("Invalid attempt to insert an invalid node type"));
		_inner_error0_ = _tmp11_;
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_TEXT)) {
		_tmp13_ = G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_DOM_DOCUMENT);
	} else {
		_tmp13_ = FALSE;
	}
	if (_tmp13_) {
		_tmp12_ = TRUE;
	} else {
		gboolean _tmp14_ = FALSE;
		if (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_DOCUMENT_TYPE)) {
			_tmp14_ = !G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_DOM_DOCUMENT);
		} else {
			_tmp14_ = FALSE;
		}
		_tmp12_ = _tmp14_;
	}
	if (_tmp12_) {
		GError* _tmp15_;
		_tmp15_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_HIERARCHY_REQUEST_ERROR, _ ("Invalid attempt to insert a document's type or text node to an invalid" \
" parent"));
		_inner_error0_ = _tmp15_;
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	if (child != NULL) {
		gint i = 0;
		GeeBidirList* _tmp16_;
		GeeBidirList* _tmp17_;
		GeeBidirList* _tmp18_;
		gint _tmp19_;
		GeeBidirList* _tmp20_;
		GeeBidirList* _tmp21_;
		GeeBidirList* _tmp22_;
		GXmlDomNode* _tmp23_;
		_tmp16_ = gxml_gnode_get_children_nodes (self);
		_tmp17_ = _tmp16_;
		_tmp18_ = _tmp17_;
		_tmp19_ = gee_list_index_of ((GeeList*) _tmp18_, G_TYPE_CHECK_INSTANCE_TYPE (child, GXML_TYPE_NODE) ? ((GXmlNode*) child) : NULL);
		_g_object_unref0 (_tmp18_);
		i = _tmp19_;
		_tmp20_ = gxml_gnode_get_children_nodes (self);
		_tmp21_ = _tmp20_;
		_tmp22_ = _tmp21_;
		gee_list_insert ((GeeList*) _tmp22_, i, G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_NODE) ? ((GXmlNode*) node) : NULL);
		_g_object_unref0 (_tmp22_);
		_tmp23_ = _g_object_ref0 (node);
		result = _tmp23_;
		return result;
	}
	_tmp24_ = gxml_gnode_get_children_nodes (self);
	_tmp25_ = _tmp24_;
	_tmp26_ = _tmp25_;
	gee_collection_add ((GeeCollection*) _tmp26_, G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_NODE) ? ((GXmlNode*) node) : NULL);
	_g_object_unref0 (_tmp26_);
	_tmp27_ = _g_object_ref0 (node);
	result = _tmp27_;
	return result;
}

static GXmlDomNode*
gxml_gnode_real_append_child (GXmlDomNode* base,
                              GXmlDomNode* node,
                              GError** error)
{
	GXmlGNode * self;
	GXmlDomNode* result = NULL;
	GXmlDomNode* _tmp0_ = NULL;
	GXmlDomNode* _tmp1_;
	GXmlDomNode* _tmp2_;
	GError* _inner_error0_ = NULL;
	self = (GXmlGNode*) base;
	g_return_val_if_fail (node != NULL, NULL);
	_tmp1_ = gxml_dom_node_insert_before ((GXmlDomNode*) self, node, NULL, &_inner_error0_);
	_tmp0_ = _tmp1_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	_tmp2_ = _tmp0_;
	_tmp0_ = NULL;
	result = _tmp2_;
	_g_object_unref0 (_tmp0_);
	return result;
}

static GXmlDomNode*
gxml_gnode_real_replace_child (GXmlDomNode* base,
                               GXmlDomNode* node,
                               GXmlDomNode* child,
                               GError** error)
{
	GXmlGNode * self;
	GXmlDomNode* result = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_ = FALSE;
	gint i = 0;
	GeeBidirList* _tmp16_;
	GeeBidirList* _tmp17_;
	GeeBidirList* _tmp18_;
	gint _tmp19_;
	GeeBidirList* _tmp20_;
	GeeBidirList* _tmp21_;
	GeeBidirList* _tmp22_;
	gpointer _tmp23_;
	GXmlNode* _tmp24_;
	GeeBidirList* _tmp25_;
	GeeBidirList* _tmp26_;
	GeeBidirList* _tmp27_;
	gint _tmp28_;
	gint _tmp29_;
	gboolean _tmp30_;
	GeeBidirList* _tmp34_;
	GeeBidirList* _tmp35_;
	GeeBidirList* _tmp36_;
	gint _tmp37_;
	gint _tmp38_;
	gboolean _tmp39_;
	GXmlDomNode* _tmp43_;
	GError* _inner_error0_ = NULL;
	self = (GXmlGNode*) base;
	g_return_val_if_fail (node != NULL, NULL);
	g_return_val_if_fail (child != NULL, NULL);
	if (!G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_GNODE)) {
		GError* _tmp0_;
		_tmp0_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_INVALID_NODE_TYPE_ERROR, _ ("Invalid attempt to add invalid node type"));
		_inner_error0_ = _tmp0_;
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	if (child == NULL) {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = !gxml_dom_node_contains ((GXmlDomNode*) self, child);
	}
	if (_tmp1_) {
		GError* _tmp2_;
		_tmp2_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_NOT_FOUND_ERROR, _ ("Can't find child node to replace or child have a different parent"));
		_inner_error0_ = _tmp2_;
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_DOM_DOCUMENT)) {
		_tmp4_ = TRUE;
	} else {
		_tmp4_ = G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_DOM_ELEMENT);
	}
	if (_tmp4_) {
		_tmp3_ = TRUE;
	} else {
		_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_DOM_DOCUMENT_FRAGMENT);
	}
	if (!_tmp3_) {
		GError* _tmp5_;
		_tmp5_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_HIERARCHY_REQUEST_ERROR, _ ("Invalid attempt to insert a node"));
		_inner_error0_ = _tmp5_;
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_DOCUMENT_FRAGMENT)) {
		_tmp10_ = TRUE;
	} else {
		_tmp10_ = G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_DOCUMENT_TYPE);
	}
	if (_tmp10_) {
		_tmp9_ = TRUE;
	} else {
		_tmp9_ = G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_ELEMENT);
	}
	if (_tmp9_) {
		_tmp8_ = TRUE;
	} else {
		_tmp8_ = G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_TEXT);
	}
	if (_tmp8_) {
		_tmp7_ = TRUE;
	} else {
		_tmp7_ = G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_PROCESSING_INSTRUCTION);
	}
	if (_tmp7_) {
		_tmp6_ = TRUE;
	} else {
		_tmp6_ = G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_COMMENT);
	}
	if (!_tmp6_) {
		GError* _tmp11_;
		_tmp11_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_HIERARCHY_REQUEST_ERROR, _ ("Invalid attempt to insert an invalid node type"));
		_inner_error0_ = _tmp11_;
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_TEXT)) {
		_tmp13_ = G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_DOM_DOCUMENT);
	} else {
		_tmp13_ = FALSE;
	}
	if (_tmp13_) {
		_tmp12_ = TRUE;
	} else {
		gboolean _tmp14_ = FALSE;
		if (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_DOCUMENT_TYPE)) {
			_tmp14_ = !G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_DOM_DOCUMENT);
		} else {
			_tmp14_ = FALSE;
		}
		_tmp12_ = _tmp14_;
	}
	if (_tmp12_) {
		GError* _tmp15_;
		_tmp15_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_HIERARCHY_REQUEST_ERROR, _ ("Invalid attempt to insert a document's type or text node to an invalid" \
" parent"));
		_inner_error0_ = _tmp15_;
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	_tmp16_ = gxml_gnode_get_children_nodes (self);
	_tmp17_ = _tmp16_;
	_tmp18_ = _tmp17_;
	_tmp19_ = gee_list_index_of ((GeeList*) _tmp18_, G_TYPE_CHECK_INSTANCE_TYPE (child, GXML_TYPE_NODE) ? ((GXmlNode*) child) : NULL);
	_g_object_unref0 (_tmp18_);
	i = _tmp19_;
	_tmp20_ = gxml_gnode_get_children_nodes (self);
	_tmp21_ = _tmp20_;
	_tmp22_ = _tmp21_;
	_tmp23_ = gee_list_remove_at ((GeeList*) _tmp22_, i);
	_tmp24_ = (GXmlNode*) _tmp23_;
	_g_object_unref0 (_tmp24_);
	_g_object_unref0 (_tmp22_);
	_tmp25_ = gxml_gnode_get_children_nodes (self);
	_tmp26_ = _tmp25_;
	_tmp27_ = _tmp26_;
	_tmp28_ = gee_collection_get_size ((GeeCollection*) _tmp27_);
	_tmp29_ = _tmp28_;
	_tmp30_ = i < _tmp29_;
	_g_object_unref0 (_tmp27_);
	if (_tmp30_) {
		GeeBidirList* _tmp31_;
		GeeBidirList* _tmp32_;
		GeeBidirList* _tmp33_;
		_tmp31_ = gxml_gnode_get_children_nodes (self);
		_tmp32_ = _tmp31_;
		_tmp33_ = _tmp32_;
		gee_list_insert ((GeeList*) _tmp33_, i, G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_NODE) ? ((GXmlNode*) node) : NULL);
		_g_object_unref0 (_tmp33_);
	}
	_tmp34_ = gxml_gnode_get_children_nodes (self);
	_tmp35_ = _tmp34_;
	_tmp36_ = _tmp35_;
	_tmp37_ = gee_collection_get_size ((GeeCollection*) _tmp36_);
	_tmp38_ = _tmp37_;
	_tmp39_ = i >= _tmp38_;
	_g_object_unref0 (_tmp36_);
	if (_tmp39_) {
		GXmlDomNodeList* _tmp40_;
		GXmlDomNodeList* _tmp41_;
		GXmlDomNodeList* _tmp42_;
		_tmp40_ = gxml_dom_node_get_child_nodes ((GXmlDomNode*) self);
		_tmp41_ = _tmp40_;
		_tmp42_ = _tmp41_;
		gee_collection_add ((GeeCollection*) _tmp42_, node);
		_g_object_unref0 (_tmp42_);
	}
	_tmp43_ = _g_object_ref0 (child);
	result = _tmp43_;
	return result;
}

static GXmlDomNode*
gxml_gnode_real_remove_child (GXmlDomNode* base,
                              GXmlDomNode* child,
                              GError** error)
{
	GXmlGNode * self;
	GXmlDomNode* result = NULL;
	gint i = 0;
	GeeBidirList* _tmp1_;
	GeeBidirList* _tmp2_;
	GeeBidirList* _tmp3_;
	gint _tmp4_;
	GeeBidirList* _tmp5_;
	GeeBidirList* _tmp6_;
	GeeBidirList* _tmp7_;
	gpointer _tmp8_;
	GXmlDomNode* _tmp9_;
	GError* _inner_error0_ = NULL;
	self = (GXmlGNode*) base;
	g_return_val_if_fail (child != NULL, NULL);
	if (!gxml_dom_node_contains ((GXmlDomNode*) self, child)) {
		GError* _tmp0_;
		_tmp0_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_NOT_FOUND_ERROR, _ ("Can't find child node to remove or child have a different parent"));
		_inner_error0_ = _tmp0_;
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	_tmp1_ = gxml_gnode_get_children_nodes (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_list_index_of ((GeeList*) _tmp3_, G_TYPE_CHECK_INSTANCE_TYPE (child, GXML_TYPE_NODE) ? ((GXmlNode*) child) : NULL);
	_g_object_unref0 (_tmp3_);
	i = _tmp4_;
	_tmp5_ = gxml_gnode_get_children_nodes (self);
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp6_;
	_tmp8_ = gee_list_remove_at ((GeeList*) _tmp7_, i);
	_tmp9_ = G_TYPE_CHECK_INSTANCE_CAST ((GXmlNode*) _tmp8_, GXML_TYPE_DOM_NODE, GXmlDomNode);
	_g_object_unref0 (_tmp7_);
	result = _tmp9_;
	return result;
}

static void
gxml_gnode_real_add_event_listener (GXmlDomEventTarget* base,
                                    const gchar* type,
                                    GXmlDomEventListener* callback,
                                    gboolean capture)
{
	GXmlGNode * self;
	self = (GXmlGNode*) base;
	g_return_if_fail (type != NULL);
	return;
}

static void
gxml_gnode_real_remove_event_listener (GXmlDomEventTarget* base,
                                       const gchar* type,
                                       GXmlDomEventListener* callback,
                                       gboolean capture)
{
	GXmlGNode * self;
	self = (GXmlGNode*) base;
	g_return_if_fail (type != NULL);
	return;
}

static gboolean
gxml_gnode_real_dispatch_event (GXmlDomEventTarget* base,
                                GXmlDomEvent* event,
                                GError** error)
{
	GXmlGNode * self;
	gboolean result = FALSE;
	self = (GXmlGNode*) base;
	g_return_val_if_fail (event != NULL, FALSE);
	result = FALSE;
	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_;
	xmlNode* _tmp1_;
	GXmlGHashMapAttr* _tmp2_;
	GeeMap* _tmp3_;
	self = base;
	_tmp0_ = self->_doc;
	_tmp1_ = self->_node;
	_tmp2_ = gxml_ghash_map_attr_new (_tmp0_, _tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, GEE_TYPE_MAP) ? ((GeeMap*) _tmp2_) : NULL;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (_tmp2_);
	}
	result = _tmp3_;
	return result;
}

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

static GeeBidirList*
gxml_gnode_real_get_children_nodes (GXmlGNode* base)
{
	GeeBidirList* result;
	GXmlGNode* self;
	GXmlGDocument* _tmp0_;
	xmlNode* _tmp1_;
	GXmlGListChildren* _tmp2_;
	GeeBidirList* _tmp3_;
	self = base;
	_tmp0_ = self->_doc;
	_tmp1_ = self->_node;
	_tmp2_ = gxml_glist_children_new (_tmp0_, _tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, GEE_TYPE_BIDIR_LIST) ? ((GeeBidirList*) _tmp2_) : NULL;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (_tmp2_);
	}
	result = _tmp3_;
	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_;
	xmlNode* _tmp1_;
	GXmlGListNamespaces* _tmp2_;
	GeeList* _tmp3_;
	self = base;
	_tmp0_ = self->_doc;
	_tmp1_ = self->_node;
	_tmp2_ = gxml_glist_namespaces_new (_tmp0_, _tmp1_);
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, GEE_TYPE_LIST) ? ((GeeList*) _tmp2_) : NULL;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (_tmp2_);
	}
	result = _tmp3_;
	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_;
	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;
	GXmlNode* nullnode = NULL;
	xmlNode* _tmp0_;
	GXmlDocument* _tmp1_;
	GXmlDocument* _tmp2_;
	xmlNode* _tmp3_;
	xmlNode* _tmp4_;
	GXmlNode* _tmp5_;
	self = base;
	nullnode = NULL;
	_tmp0_ = self->_node;
	if (_tmp0_ == NULL) {
		result = nullnode;
		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_;
	_g_object_unref0 (nullnode);
	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_;
	xmlNode* _tmp1_;
	xmlElementType _tmp2_;
	self = base;
	_tmp0_ = self->_node;
	if (_tmp0_ == NULL) {
		result = GXML_NODE_TYPE_INVALID;
		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_;
	xmlNode* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	self = base;
	_tmp0_ = self->_node;
	if (_tmp0_ == NULL) {
		gchar* _tmp1_;
		_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_;
	xmlNode* _tmp2_;
	gchar* _tmp3_;
	self = base;
	_tmp0_ = self->_node;
	if (_tmp0_ == NULL) {
		gchar* _tmp1_;
		_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_;
	xmlNode* _tmp1_;
	self = base;
	_tmp0_ = self->_node;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->_node;
	xmlNodeSetContent (_tmp1_, (xmlChar*) value);
	g_object_notify_by_pspec ((GObject *) self, gxml_gnode_properties[GXML_GNODE_VALUE_PROPERTY]);
}

static GXmlDomNodeNodeType
gxml_gnode_real_get_node_type (GXmlDomNode* base)
{
	GXmlDomNodeNodeType result;
	GXmlGNode* self;
	xmlNode* _tmp0_;
	xmlNode* _tmp1_;
	xmlElementType _tmp2_;
	self = (GXmlGNode*) base;
	_tmp0_ = self->_node;
	if (_tmp0_ == NULL) {
		result = GXML_DOM_NODE_NODE_TYPE_INVALID;
		return result;
	}
	_tmp1_ = self->_node;
	_tmp2_ = _tmp1_->type;
	switch (_tmp2_) {
		case XML_ELEMENT_NODE:
		{
			result = GXML_DOM_NODE_NODE_TYPE_ELEMENT_NODE;
			return result;
		}
		case XML_ATTRIBUTE_NODE:
		{
			result = GXML_DOM_NODE_NODE_TYPE_ATTRIBUTE_NODE;
			return result;
		}
		case XML_TEXT_NODE:
		{
			result = GXML_DOM_NODE_NODE_TYPE_TEXT_NODE;
			return result;
		}
		case XML_CDATA_SECTION_NODE:
		{
			result = GXML_DOM_NODE_NODE_TYPE_CDATA_SECTION_NODE;
			return result;
		}
		case XML_ENTITY_REF_NODE:
		{
			result = GXML_DOM_NODE_NODE_TYPE_ENTITY_REFERENCE_NODE;
			return result;
		}
		case XML_ENTITY_NODE:
		{
			result = GXML_DOM_NODE_NODE_TYPE_ENTITY_NODE;
			return result;
		}
		case XML_PI_NODE:
		{
			result = GXML_DOM_NODE_NODE_TYPE_PROCESSING_INSTRUCTION_NODE;
			return result;
		}
		case XML_COMMENT_NODE:
		{
			result = GXML_DOM_NODE_NODE_TYPE_COMMENT_NODE;
			return result;
		}
		case XML_DOCUMENT_NODE:
		{
			result = GXML_DOM_NODE_NODE_TYPE_DOCUMENT_NODE;
			return result;
		}
		case XML_DOCUMENT_TYPE_NODE:
		{
			result = GXML_DOM_NODE_NODE_TYPE_DOCUMENT_TYPE_NODE;
			return result;
		}
		case XML_DOCUMENT_FRAG_NODE:
		{
			result = GXML_DOM_NODE_NODE_TYPE_DOCUMENT_FRAGMENT_NODE;
			return result;
		}
		case XML_NOTATION_NODE:
		{
			result = GXML_DOM_NODE_NODE_TYPE_NOTATION_NODE;
			return result;
		}
		default:
		break;
	}
	result = GXML_DOM_NODE_NODE_TYPE_INVALID;
	return result;
}

static gchar*
gxml_gnode_real_get_node_name (GXmlDomNode* base)
{
	gchar* result;
	GXmlGNode* self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	self = (GXmlGNode*) base;
	_tmp0_ = gxml_gnode_get_name (self);
	_tmp1_ = _tmp0_;
	result = _tmp1_;
	return result;
}

static const gchar*
gxml_gnode_real_get_base_uri (GXmlDomNode* base)
{
	const gchar* result;
	GXmlGNode* self;
	const gchar* _tmp0_;
	self = (GXmlGNode*) base;
	_tmp0_ = self->_base_uri;
	result = _tmp0_;
	return result;
}

static GXmlDomDocument*
gxml_gnode_real_get_owner_document (GXmlDomNode* base)
{
	GXmlDomDocument* result;
	GXmlGNode* self;
	GXmlGDocument* _tmp0_;
	self = (GXmlGNode*) base;
	_tmp0_ = self->_doc;
	result = (GXmlDomDocument*) _tmp0_;
	return result;
}

static void
gxml_gnode_real_set_owner_document (GXmlDomNode* base,
                                    GXmlDomDocument* value)
{
	GXmlGNode* self;
	GXmlGDocument* _tmp0_;
	self = (GXmlGNode*) base;
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (value, GXML_TYPE_GDOCUMENT) ? ((GXmlGDocument*) value) : NULL);
	_g_object_unref0 (self->_doc);
	self->_doc = _tmp0_;
	g_object_notify_by_pspec ((GObject *) self, gxml_gnode_properties[GXML_GNODE_OWNER_DOCUMENT_PROPERTY]);
}

static GXmlDomNode*
gxml_gnode_real_get_parent_node (GXmlDomNode* base)
{
	GXmlDomNode* result;
	GXmlGNode* self;
	GXmlNode* _tmp0_;
	GXmlNode* _tmp1_;
	GXmlDomNode* _tmp2_;
	self = (GXmlGNode*) base;
	_tmp0_ = gxml_gnode_get_parent (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, GXML_TYPE_DOM_NODE) ? ((GXmlDomNode*) _tmp1_) : NULL;
	if (_tmp2_ == NULL) {
		_g_object_unref0 (_tmp1_);
	}
	result = _tmp2_;
	return result;
}

static GXmlDomElement*
gxml_gnode_real_get_parent_element (GXmlDomNode* base)
{
	GXmlDomElement* result;
	GXmlGNode* self;
	GXmlDomElement* nullnode = NULL;
	GXmlNode* _tmp0_;
	GXmlNode* _tmp1_;
	GXmlNode* _tmp2_;
	gboolean _tmp3_;
	self = (GXmlGNode*) base;
	nullnode = NULL;
	_tmp0_ = gxml_gnode_get_parent (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, GXML_TYPE_DOM_ELEMENT);
	_g_object_unref0 (_tmp2_);
	if (_tmp3_) {
		GXmlNode* _tmp4_;
		GXmlNode* _tmp5_;
		GXmlDomElement* _tmp6_;
		_tmp4_ = gxml_gnode_get_parent (self);
		_tmp5_ = _tmp4_;
		_tmp6_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp5_) : NULL;
		if (_tmp6_ == NULL) {
			_g_object_unref0 (_tmp5_);
		}
		result = _tmp6_;
		_g_object_unref0 (nullnode);
		return result;
	}
	result = nullnode;
	return result;
}

static GXmlDomNodeList*
gxml_gnode_real_get_child_nodes (GXmlDomNode* base)
{
	GXmlDomNodeList* result;
	GXmlGNode* self;
	GeeBidirList* _tmp0_;
	GeeBidirList* _tmp1_;
	GXmlDomNodeList* _tmp2_;
	self = (GXmlGNode*) base;
	_tmp0_ = gxml_gnode_get_children_nodes (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, GXML_TYPE_DOM_NODE_LIST) ? ((GXmlDomNodeList*) _tmp1_) : NULL;
	if (_tmp2_ == NULL) {
		_g_object_unref0 (_tmp1_);
	}
	result = _tmp2_;
	return result;
}

static GXmlDomNode*
gxml_gnode_real_get_first_child (GXmlDomNode* base)
{
	GXmlDomNode* result;
	GXmlGNode* self;
	GeeBidirList* _tmp0_;
	GeeBidirList* _tmp1_;
	GeeBidirList* _tmp2_;
	gpointer _tmp3_;
	GXmlNode* _tmp4_;
	GXmlDomNode* _tmp5_;
	GXmlDomNode* _tmp6_;
	self = (GXmlGNode*) base;
	_tmp0_ = gxml_gnode_get_children_nodes (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_list_first ((GeeList*) _tmp2_);
	_tmp4_ = (GXmlNode*) _tmp3_;
	_tmp5_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, GXML_TYPE_DOM_NODE) ? ((GXmlDomNode*) _tmp4_) : NULL;
	if (_tmp5_ == NULL) {
		_g_object_unref0 (_tmp4_);
	}
	_tmp6_ = _tmp5_;
	_g_object_unref0 (_tmp2_);
	result = _tmp6_;
	return result;
}

static GXmlDomNode*
gxml_gnode_real_get_last_child (GXmlDomNode* base)
{
	GXmlDomNode* result;
	GXmlGNode* self;
	GeeBidirList* _tmp0_;
	GeeBidirList* _tmp1_;
	GeeBidirList* _tmp2_;
	gpointer _tmp3_;
	GXmlNode* _tmp4_;
	GXmlDomNode* _tmp5_;
	GXmlDomNode* _tmp6_;
	self = (GXmlGNode*) base;
	_tmp0_ = gxml_gnode_get_children_nodes (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_list_last ((GeeList*) _tmp2_);
	_tmp4_ = (GXmlNode*) _tmp3_;
	_tmp5_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, GXML_TYPE_DOM_NODE) ? ((GXmlDomNode*) _tmp4_) : NULL;
	if (_tmp5_ == NULL) {
		_g_object_unref0 (_tmp4_);
	}
	_tmp6_ = _tmp5_;
	_g_object_unref0 (_tmp2_);
	result = _tmp6_;
	return result;
}

static GXmlDomNode*
gxml_gnode_real_get_previous_sibling (GXmlDomNode* base)
{
	GXmlDomNode* result;
	GXmlGNode* self;
	xmlNode* _tmp0_;
	xmlNode* _tmp1_;
	xmlNode* _tmp2_;
	GXmlGDocument* _tmp3_;
	xmlNode* _tmp4_;
	xmlNode* _tmp5_;
	GXmlNode* _tmp6_;
	GXmlDomNode* _tmp7_;
	self = (GXmlGNode*) base;
	_tmp0_ = self->_node;
	if (_tmp0_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp1_ = self->_node;
	_tmp2_ = _tmp1_->prev;
	if (_tmp2_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp3_ = self->_doc;
	_tmp4_ = self->_node;
	_tmp5_ = _tmp4_->prev;
	_tmp6_ = gxml_gnode_to_gnode (_tmp3_, _tmp5_);
	_tmp7_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, GXML_TYPE_DOM_NODE) ? ((GXmlDomNode*) _tmp6_) : NULL;
	if (_tmp7_ == NULL) {
		_g_object_unref0 (_tmp6_);
	}
	result = _tmp7_;
	return result;
}

static GXmlDomNode*
gxml_gnode_real_get_next_sibling (GXmlDomNode* base)
{
	GXmlDomNode* result;
	GXmlGNode* self;
	xmlNode* _tmp0_;
	xmlNode* _tmp1_;
	xmlNode* _tmp2_;
	GXmlGDocument* _tmp3_;
	xmlNode* _tmp4_;
	xmlNode* _tmp5_;
	GXmlNode* _tmp6_;
	GXmlDomNode* _tmp7_;
	self = (GXmlGNode*) base;
	_tmp0_ = self->_node;
	if (_tmp0_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp1_ = self->_node;
	_tmp2_ = _tmp1_->next;
	if (_tmp2_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp3_ = self->_doc;
	_tmp4_ = self->_node;
	_tmp5_ = _tmp4_->next;
	_tmp6_ = gxml_gnode_to_gnode (_tmp3_, _tmp5_);
	_tmp7_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, GXML_TYPE_DOM_NODE) ? ((GXmlDomNode*) _tmp6_) : NULL;
	if (_tmp7_ == NULL) {
		_g_object_unref0 (_tmp6_);
	}
	result = _tmp7_;
	return result;
}

static gchar*
gxml_gnode_real_get_node_value (GXmlDomNode* base)
{
	gchar* result;
	GXmlGNode* self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	self = (GXmlGNode*) base;
	_tmp0_ = gxml_gnode_get_value (self);
	_tmp1_ = _tmp0_;
	result = _tmp1_;
	return result;
}

static void
gxml_gnode_real_set_node_value (GXmlDomNode* base,
                                const gchar* value)
{
	GXmlGNode* self;
	self = (GXmlGNode*) base;
	gxml_gnode_set_value (self, value);
	g_object_notify_by_pspec ((GObject *) self, gxml_gnode_properties[GXML_GNODE_NODE_VALUE_PROPERTY]);
}

static gchar*
gxml_gnode_real_get_text_content (GXmlDomNode* base)
{
	gchar* result;
	GXmlGNode* self;
	gchar* t = NULL;
	gboolean _tmp6_ = FALSE;
	self = (GXmlGNode*) base;
	t = NULL;
	if (G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_TEXT)) {
		gchar* _tmp0_;
		gchar* _tmp1_;
		_tmp0_ = gxml_gnode_get_value (self);
		_tmp1_ = _tmp0_;
		result = _tmp1_;
		_g_free0 (t);
		return result;
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_PROCESSING_INSTRUCTION)) {
		gchar* _tmp2_;
		gchar* _tmp3_;
		_tmp2_ = gxml_gnode_get_value (self);
		_tmp3_ = _tmp2_;
		result = _tmp3_;
		_g_free0 (t);
		return result;
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_COMMENT)) {
		gchar* _tmp4_;
		gchar* _tmp5_;
		_tmp4_ = gxml_gnode_get_value (self);
		_tmp5_ = _tmp4_;
		result = _tmp5_;
		_g_free0 (t);
		return result;
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_DOCUMENT)) {
		_tmp6_ = TRUE;
	} else {
		_tmp6_ = G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_ELEMENT);
	}
	if (_tmp6_) {
		{
			GeeBidirList* _n_list = NULL;
			GeeBidirList* _tmp7_;
			GeeBidirList* _tmp8_;
			gint _n_size = 0;
			GeeBidirList* _tmp9_;
			gint _tmp10_;
			gint _tmp11_;
			gint _n_index = 0;
			_tmp7_ = gxml_gnode_get_children_nodes (self);
			_tmp8_ = _tmp7_;
			_n_list = _tmp8_;
			_tmp9_ = _n_list;
			_tmp10_ = gee_collection_get_size ((GeeCollection*) _tmp9_);
			_tmp11_ = _tmp10_;
			_n_size = _tmp11_;
			_n_index = -1;
			while (TRUE) {
				GXmlNode* n = NULL;
				GeeBidirList* _tmp12_;
				gpointer _tmp13_;
				GXmlNode* _tmp14_;
				_n_index = _n_index + 1;
				if (!(_n_index < _n_size)) {
					break;
				}
				_tmp12_ = _n_list;
				_tmp13_ = gee_list_get ((GeeList*) _tmp12_, _n_index);
				n = (GXmlNode*) _tmp13_;
				_tmp14_ = n;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, GXML_TYPE_TEXT)) {
					const gchar* _tmp15_;
					_tmp15_ = t;
					if (_tmp15_ == NULL) {
						GXmlNode* _tmp16_;
						gchar* _tmp17_;
						gchar* _tmp18_;
						_tmp16_ = n;
						_tmp17_ = gxml_node_get_value (_tmp16_);
						_tmp18_ = _tmp17_;
						_g_free0 (t);
						t = _tmp18_;
					} else {
						const gchar* _tmp19_;
						GXmlNode* _tmp20_;
						gchar* _tmp21_;
						gchar* _tmp22_;
						gchar* _tmp23_;
						gchar* _tmp24_;
						_tmp19_ = t;
						_tmp20_ = n;
						_tmp21_ = gxml_node_get_value (_tmp20_);
						_tmp22_ = _tmp21_;
						_tmp23_ = _tmp22_;
						_tmp24_ = g_strconcat (_tmp19_, _tmp23_, NULL);
						_g_free0 (t);
						t = _tmp24_;
						_g_free0 (_tmp23_);
					}
				}
				_g_object_unref0 (n);
			}
			_g_object_unref0 (_n_list);
		}
	}
	result = t;
	return result;
}

static void
gxml_gnode_real_set_text_content (GXmlDomNode* base,
                                  const gchar* value)
{
	GXmlGNode* self;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp10_ = FALSE;
	gboolean _tmp11_ = FALSE;
	self = (GXmlGNode*) base;
	if (G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_DOCUMENT)) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_ELEMENT);
	}
	if (_tmp0_) {
		GXmlNode* t = NULL;
		GXmlDocument* _tmp1_;
		GXmlDocument* _tmp2_;
		GXmlNode* _tmp3_;
		GXmlDocument* _tmp4_;
		GXmlDocument* _tmp5_;
		GeeBidirList* _tmp6_;
		GeeBidirList* _tmp7_;
		GeeBidirList* _tmp8_;
		GXmlNode* _tmp9_;
		_tmp1_ = gxml_gnode_get_document (self);
		_tmp2_ = _tmp1_;
		_tmp3_ = gxml_document_create_text (_tmp2_, value);
		t = _tmp3_;
		_tmp4_ = gxml_gnode_get_document (self);
		_tmp5_ = _tmp4_;
		_tmp6_ = gxml_node_get_children_nodes ((GXmlNode*) _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = _tmp7_;
		_tmp9_ = t;
		gee_collection_add ((GeeCollection*) _tmp8_, _tmp9_);
		_g_object_unref0 (_tmp8_);
		_g_object_unref0 (t);
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_TEXT)) {
		_tmp11_ = TRUE;
	} else {
		_tmp11_ = G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_COMMENT);
	}
	if (_tmp11_) {
		_tmp10_ = TRUE;
	} else {
		_tmp10_ = G_TYPE_CHECK_INSTANCE_TYPE (self, GXML_TYPE_PROCESSING_INSTRUCTION);
	}
	if (!_tmp10_) {
		return;
	}
	gxml_gnode_set_value (self, value);
	g_object_notify_by_pspec ((GObject *) self, gxml_gnode_properties[GXML_GNODE_TEXT_CONTENT_PROPERTY]);
}

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,
                       gpointer klass_data)
{
	gxml_gnode_parent_class = g_type_class_peek_parent (klass);
	((GXmlGNodeClass *) klass)->set_namespace = (gboolean (*) (GXmlGNode*, const gchar*, const gchar*)) gxml_gnode_real_set_namespace;
	((GXmlGNodeClass *) klass)->to_string = (gchar* (*) (GXmlGNode*)) gxml_gnode_real_to_string;
	GXML_GNODE_CLASS (klass)->get_attrs = gxml_gnode_real_get_attrs;
	GXML_GNODE_CLASS (klass)->get_children_nodes = gxml_gnode_real_get_children_nodes;
	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_PROPERTY, gxml_gnode_properties[GXML_GNODE_ATTRS_PROPERTY] = g_param_spec_object ("attrs", "attrs", "attrs", GEE_TYPE_MAP, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_CHILDREN_NODES_PROPERTY, gxml_gnode_properties[GXML_GNODE_CHILDREN_NODES_PROPERTY] = g_param_spec_object ("children-nodes", "children-nodes", "children-nodes", GEE_TYPE_BIDIR_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_NAMESPACES_PROPERTY, gxml_gnode_properties[GXML_GNODE_NAMESPACES_PROPERTY] = g_param_spec_object ("namespaces", "namespaces", "namespaces", GEE_TYPE_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_DOCUMENT_PROPERTY, gxml_gnode_properties[GXML_GNODE_DOCUMENT_PROPERTY] = g_param_spec_object ("document", "document", "document", GXML_TYPE_DOCUMENT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_PARENT_PROPERTY, gxml_gnode_properties[GXML_GNODE_PARENT_PROPERTY] = g_param_spec_object ("parent", "parent", "parent", GXML_TYPE_NODE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_TYPE_NODE_PROPERTY, gxml_gnode_properties[GXML_GNODE_TYPE_NODE_PROPERTY] = g_param_spec_enum ("type-node", "type-node", "type-node", GXML_TYPE_NODE_TYPE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_NAME_PROPERTY, gxml_gnode_properties[GXML_GNODE_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_VALUE_PROPERTY, gxml_gnode_properties[GXML_GNODE_VALUE_PROPERTY] = g_param_spec_string ("value", "value", "value", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_NODE_TYPE_PROPERTY, gxml_gnode_properties[GXML_GNODE_NODE_TYPE_PROPERTY] = g_param_spec_enum ("node-type", "node-type", "node-type", GXML_DOM_NODE_TYPE_NODE_TYPE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_NODE_NAME_PROPERTY, gxml_gnode_properties[GXML_GNODE_NODE_NAME_PROPERTY] = g_param_spec_string ("node-name", "node-name", "node-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_BASE_URI_PROPERTY, gxml_gnode_properties[GXML_GNODE_BASE_URI_PROPERTY] = g_param_spec_string ("base-uri", "base-uri", "base-uri", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_OWNER_DOCUMENT_PROPERTY, gxml_gnode_properties[GXML_GNODE_OWNER_DOCUMENT_PROPERTY] = g_param_spec_object ("owner-document", "owner-document", "owner-document", GXML_TYPE_DOM_DOCUMENT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_PARENT_NODE_PROPERTY, gxml_gnode_properties[GXML_GNODE_PARENT_NODE_PROPERTY] = g_param_spec_object ("parent-node", "parent-node", "parent-node", GXML_TYPE_DOM_NODE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_PARENT_ELEMENT_PROPERTY, gxml_gnode_properties[GXML_GNODE_PARENT_ELEMENT_PROPERTY] = g_param_spec_object ("parent-element", "parent-element", "parent-element", GXML_TYPE_DOM_ELEMENT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_CHILD_NODES_PROPERTY, gxml_gnode_properties[GXML_GNODE_CHILD_NODES_PROPERTY] = g_param_spec_object ("child-nodes", "child-nodes", "child-nodes", GXML_TYPE_DOM_NODE_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_FIRST_CHILD_PROPERTY, gxml_gnode_properties[GXML_GNODE_FIRST_CHILD_PROPERTY] = g_param_spec_object ("first-child", "first-child", "first-child", GXML_TYPE_DOM_NODE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_LAST_CHILD_PROPERTY, gxml_gnode_properties[GXML_GNODE_LAST_CHILD_PROPERTY] = g_param_spec_object ("last-child", "last-child", "last-child", GXML_TYPE_DOM_NODE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_PREVIOUS_SIBLING_PROPERTY, gxml_gnode_properties[GXML_GNODE_PREVIOUS_SIBLING_PROPERTY] = g_param_spec_object ("previous-sibling", "previous-sibling", "previous-sibling", GXML_TYPE_DOM_NODE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_NEXT_SIBLING_PROPERTY, gxml_gnode_properties[GXML_GNODE_NEXT_SIBLING_PROPERTY] = g_param_spec_object ("next-sibling", "next-sibling", "next-sibling", GXML_TYPE_DOM_NODE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_NODE_VALUE_PROPERTY, gxml_gnode_properties[GXML_GNODE_NODE_VALUE_PROPERTY] = g_param_spec_string ("node-value", "node-value", "node-value", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GNODE_TEXT_CONTENT_PROPERTY, gxml_gnode_properties[GXML_GNODE_TEXT_CONTENT_PROPERTY] = g_param_spec_string ("text-content", "text-content", "text-content", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
gxml_gnode_gxml_dom_event_target_interface_init (GXmlDomEventTargetIface * iface,
                                                 gpointer iface_data)
{
	gxml_gnode_gxml_dom_event_target_parent_iface = g_type_interface_peek_parent (iface);
	iface->add_event_listener = (void (*) (GXmlDomEventTarget*, const gchar*, GXmlDomEventListener*, gboolean)) gxml_gnode_real_add_event_listener;
	iface->remove_event_listener = (void (*) (GXmlDomEventTarget*, const gchar*, GXmlDomEventListener*, gboolean)) gxml_gnode_real_remove_event_listener;
	iface->dispatch_event = (gboolean (*) (GXmlDomEventTarget*, GXmlDomEvent*, GError**)) gxml_gnode_real_dispatch_event;
}

static void
gxml_gnode_gxml_dom_node_interface_init (GXmlDomNodeIface * iface,
                                         gpointer iface_data)
{
	gxml_gnode_gxml_dom_node_parent_iface = g_type_interface_peek_parent (iface);
	iface->has_child_nodes = (gboolean (*) (GXmlDomNode*)) gxml_gnode_real_has_child_nodes;
	iface->normalize = (void (*) (GXmlDomNode*)) gxml_gnode_real_normalize;
	iface->clone_node = (GXmlDomNode* (*) (GXmlDomNode*, gboolean, GError**)) gxml_gnode_real_clone_node;
	iface->is_equal_node = (gboolean (*) (GXmlDomNode*, GXmlDomNode*)) gxml_gnode_real_is_equal_node;
	iface->compare_document_position = (GXmlDomNodeDocumentPosition (*) (GXmlDomNode*, GXmlDomNode*)) gxml_gnode_real_compare_document_position;
	iface->contains = (gboolean (*) (GXmlDomNode*, GXmlDomNode*)) gxml_gnode_real_contains;
	iface->lookup_prefix = (gchar* (*) (GXmlDomNode*, const gchar*)) gxml_gnode_real_lookup_prefix;
	iface->lookup_namespace_uri = (gchar* (*) (GXmlDomNode*, const gchar*)) gxml_gnode_real_lookup_namespace_uri;
	iface->is_default_namespace = (gboolean (*) (GXmlDomNode*, const gchar*)) gxml_gnode_real_is_default_namespace;
	iface->insert_before = (GXmlDomNode* (*) (GXmlDomNode*, GXmlDomNode*, GXmlDomNode*, GError**)) gxml_gnode_real_insert_before;
	iface->append_child = (GXmlDomNode* (*) (GXmlDomNode*, GXmlDomNode*, GError**)) gxml_gnode_real_append_child;
	iface->replace_child = (GXmlDomNode* (*) (GXmlDomNode*, GXmlDomNode*, GXmlDomNode*, GError**)) gxml_gnode_real_replace_child;
	iface->remove_child = (GXmlDomNode* (*) (GXmlDomNode*, GXmlDomNode*, GError**)) gxml_gnode_real_remove_child;
	iface->get_node_type = gxml_gnode_real_get_node_type;
	iface->get_node_name = gxml_gnode_real_get_node_name;
	iface->get_base_uri = gxml_gnode_real_get_base_uri;
	iface->get_owner_document = gxml_gnode_real_get_owner_document;
	iface->set_owner_document = gxml_gnode_real_set_owner_document;
	iface->get_parent_node = gxml_gnode_real_get_parent_node;
	iface->get_parent_element = gxml_gnode_real_get_parent_element;
	iface->get_child_nodes = gxml_gnode_real_get_child_nodes;
	iface->get_first_child = gxml_gnode_real_get_first_child;
	iface->get_last_child = gxml_gnode_real_get_last_child;
	iface->get_previous_sibling = gxml_gnode_real_get_previous_sibling;
	iface->get_next_sibling = gxml_gnode_real_get_next_sibling;
	iface->get_node_value = gxml_gnode_real_get_node_value;
	iface->set_node_value = gxml_gnode_real_set_node_value;
	iface->get_text_content = gxml_gnode_real_get_text_content;
	iface->set_text_content = gxml_gnode_real_set_text_content;
}

static void
gxml_gnode_gxml_node_interface_init (GXmlNodeIface * iface,
                                     gpointer iface_data)
{
	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_nodes = (GeeBidirList* (*) (GXmlNode *)) gxml_gnode_get_children_nodes;
	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,
                          gpointer klass)
{
	self->_base_uri = NULL;
}

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_free0 (self->_base_uri);
	G_OBJECT_CLASS (gxml_gnode_parent_class)->finalize (obj);
}

/**
 * DOM4 Base interface providing basic functionalities to all libxml2 DOM4 implementations.
 */
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_dom_event_target_info = { (GInterfaceInitFunc) gxml_gnode_gxml_dom_event_target_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo gxml_dom_node_info = { (GInterfaceInitFunc) gxml_gnode_gxml_dom_node_interface_init, (GInterfaceFinalizeFunc) NULL, 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_DOM_EVENT_TARGET, &gxml_dom_event_target_info);
		g_type_add_interface_static (gxml_gnode_type_id, GXML_TYPE_DOM_NODE, &gxml_dom_node_info);
		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_PROPERTY:
		g_value_take_object (value, gxml_gnode_get_attrs (self));
		break;
		case GXML_GNODE_CHILDREN_NODES_PROPERTY:
		g_value_take_object (value, gxml_gnode_get_children_nodes (self));
		break;
		case GXML_GNODE_NAMESPACES_PROPERTY:
		g_value_take_object (value, gxml_gnode_get_namespaces (self));
		break;
		case GXML_GNODE_DOCUMENT_PROPERTY:
		g_value_set_object (value, gxml_gnode_get_document (self));
		break;
		case GXML_GNODE_PARENT_PROPERTY:
		g_value_take_object (value, gxml_gnode_get_parent (self));
		break;
		case GXML_GNODE_TYPE_NODE_PROPERTY:
		g_value_set_enum (value, gxml_gnode_get_type_node (self));
		break;
		case GXML_GNODE_NAME_PROPERTY:
		g_value_take_string (value, gxml_gnode_get_name (self));
		break;
		case GXML_GNODE_VALUE_PROPERTY:
		g_value_take_string (value, gxml_gnode_get_value (self));
		break;
		case GXML_GNODE_NODE_TYPE_PROPERTY:
		g_value_set_enum (value, gxml_dom_node_get_node_type ((GXmlDomNode*) self));
		break;
		case GXML_GNODE_NODE_NAME_PROPERTY:
		g_value_take_string (value, gxml_dom_node_get_node_name ((GXmlDomNode*) self));
		break;
		case GXML_GNODE_BASE_URI_PROPERTY:
		g_value_set_string (value, gxml_dom_node_get_base_uri ((GXmlDomNode*) self));
		break;
		case GXML_GNODE_OWNER_DOCUMENT_PROPERTY:
		g_value_set_object (value, gxml_dom_node_get_owner_document ((GXmlDomNode*) self));
		break;
		case GXML_GNODE_PARENT_NODE_PROPERTY:
		g_value_take_object (value, gxml_dom_node_get_parent_node ((GXmlDomNode*) self));
		break;
		case GXML_GNODE_PARENT_ELEMENT_PROPERTY:
		g_value_take_object (value, gxml_dom_node_get_parent_element ((GXmlDomNode*) self));
		break;
		case GXML_GNODE_CHILD_NODES_PROPERTY:
		g_value_take_object (value, gxml_dom_node_get_child_nodes ((GXmlDomNode*) self));
		break;
		case GXML_GNODE_FIRST_CHILD_PROPERTY:
		g_value_take_object (value, gxml_dom_node_get_first_child ((GXmlDomNode*) self));
		break;
		case GXML_GNODE_LAST_CHILD_PROPERTY:
		g_value_take_object (value, gxml_dom_node_get_last_child ((GXmlDomNode*) self));
		break;
		case GXML_GNODE_PREVIOUS_SIBLING_PROPERTY:
		g_value_take_object (value, gxml_dom_node_get_previous_sibling ((GXmlDomNode*) self));
		break;
		case GXML_GNODE_NEXT_SIBLING_PROPERTY:
		g_value_take_object (value, gxml_dom_node_get_next_sibling ((GXmlDomNode*) self));
		break;
		case GXML_GNODE_NODE_VALUE_PROPERTY:
		g_value_take_string (value, gxml_dom_node_get_node_value ((GXmlDomNode*) self));
		break;
		case GXML_GNODE_TEXT_CONTENT_PROPERTY:
		g_value_take_string (value, gxml_dom_node_get_text_content ((GXmlDomNode*) 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_PROPERTY:
		gxml_gnode_set_value (self, g_value_get_string (value));
		break;
		case GXML_GNODE_OWNER_DOCUMENT_PROPERTY:
		gxml_dom_node_set_owner_document ((GXmlDomNode*) self, g_value_get_object (value));
		break;
		case GXML_GNODE_NODE_VALUE_PROPERTY:
		gxml_dom_node_set_node_value ((GXmlDomNode*) self, g_value_get_string (value));
		break;
		case GXML_GNODE_TEXT_CONTENT_PROPERTY:
		gxml_dom_node_set_text_content ((GXmlDomNode*) self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

