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

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

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

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

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>


#define GXML_TYPE_GOM_COLLECTION (gxml_gom_collection_get_type ())
#define GXML_GOM_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GOM_COLLECTION, GXmlGomCollection))
#define GXML_IS_GOM_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GOM_COLLECTION))
#define GXML_GOM_COLLECTION_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_GOM_COLLECTION, GXmlGomCollectionIface))

typedef struct _GXmlGomCollection GXmlGomCollection;
typedef struct _GXmlGomCollectionIface GXmlGomCollectionIface;

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

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

#define GXML_DOM_NODE_TYPE_DOCUMENT_POSITION (gxml_dom_node_document_position_get_type ())

#define GXML_DOM_NODE_TYPE_NODE_TYPE (gxml_dom_node_node_type_get_type ())

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

#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_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_NODE (gxml_node_get_type ())
#define GXML_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_NODE, GXmlNode))
#define GXML_IS_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_NODE))
#define GXML_NODE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_NODE, GXmlNodeIface))

typedef struct _GXmlNode GXmlNode;
typedef struct _GXmlNodeIface GXmlNodeIface;

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

typedef struct _GXmlElementList GXmlElementList;
typedef struct _GXmlElementListClass GXmlElementListClass;

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

typedef struct _GXmlNamespace GXmlNamespace;
typedef struct _GXmlNamespaceIface GXmlNamespaceIface;

#define GXML_TYPE_NODE_TYPE (gxml_node_type_get_type ())

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

typedef struct _GXmlDocument GXmlDocument;
typedef struct _GXmlDocumentIface GXmlDocumentIface;

#define GXML_TYPE_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_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_GOM_NODE (gxml_gom_node_get_type ())
#define GXML_GOM_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GOM_NODE, GXmlGomNode))
#define GXML_GOM_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GOM_NODE, GXmlGomNodeClass))
#define GXML_IS_GOM_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GOM_NODE))
#define GXML_IS_GOM_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GOM_NODE))
#define GXML_GOM_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GOM_NODE, GXmlGomNodeClass))

typedef struct _GXmlGomNode GXmlGomNode;
typedef struct _GXmlGomNodeClass GXmlGomNodeClass;

#define GXML_TYPE_GOM_ELEMENT (gxml_gom_element_get_type ())
#define GXML_GOM_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GOM_ELEMENT, GXmlGomElement))
#define GXML_GOM_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GOM_ELEMENT, GXmlGomElementClass))
#define GXML_IS_GOM_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GOM_ELEMENT))
#define GXML_IS_GOM_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GOM_ELEMENT))
#define GXML_GOM_ELEMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GOM_ELEMENT, GXmlGomElementClass))

typedef struct _GXmlGomElement GXmlGomElement;
typedef struct _GXmlGomElementClass GXmlGomElementClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define GXML_TYPE_BASE_COLLECTION (gxml_base_collection_get_type ())
#define GXML_BASE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_BASE_COLLECTION, GXmlBaseCollection))
#define GXML_BASE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_BASE_COLLECTION, GXmlBaseCollectionClass))
#define GXML_IS_BASE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_BASE_COLLECTION))
#define GXML_IS_BASE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_BASE_COLLECTION))
#define GXML_BASE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_BASE_COLLECTION, GXmlBaseCollectionClass))

typedef struct _GXmlBaseCollection GXmlBaseCollection;
typedef struct _GXmlBaseCollectionClass GXmlBaseCollectionClass;
typedef struct _GXmlBaseCollectionPrivate GXmlBaseCollectionPrivate;
#define _g_queue_free0(var) ((var == NULL) ? NULL : (var = (g_queue_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define GXML_TYPE_GOM_OBJECT (gxml_gom_object_get_type ())
#define GXML_GOM_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GOM_OBJECT, GXmlGomObject))
#define GXML_IS_GOM_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GOM_OBJECT))
#define GXML_GOM_OBJECT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_GOM_OBJECT, GXmlGomObjectIface))

typedef struct _GXmlGomObject GXmlGomObject;
typedef struct _GXmlGomObjectIface GXmlGomObjectIface;

#define GXML_TYPE_GOM_ARRAY_LIST (gxml_gom_array_list_get_type ())
#define GXML_GOM_ARRAY_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GOM_ARRAY_LIST, GXmlGomArrayList))
#define GXML_GOM_ARRAY_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GOM_ARRAY_LIST, GXmlGomArrayListClass))
#define GXML_IS_GOM_ARRAY_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GOM_ARRAY_LIST))
#define GXML_IS_GOM_ARRAY_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GOM_ARRAY_LIST))
#define GXML_GOM_ARRAY_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GOM_ARRAY_LIST, GXmlGomArrayListClass))

typedef struct _GXmlGomArrayList GXmlGomArrayList;
typedef struct _GXmlGomArrayListClass GXmlGomArrayListClass;
typedef struct _GXmlGomArrayListPrivate GXmlGomArrayListPrivate;

#define GXML_TYPE_MAPPEABLE_ELEMENT (gxml_mappeable_element_get_type ())
#define GXML_MAPPEABLE_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_MAPPEABLE_ELEMENT, GXmlMappeableElement))
#define GXML_IS_MAPPEABLE_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_MAPPEABLE_ELEMENT))
#define GXML_MAPPEABLE_ELEMENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_MAPPEABLE_ELEMENT, GXmlMappeableElementIface))

typedef struct _GXmlMappeableElement GXmlMappeableElement;
typedef struct _GXmlMappeableElementIface GXmlMappeableElementIface;

#define GXML_TYPE_GOM_HASH_MAP (gxml_gom_hash_map_get_type ())
#define GXML_GOM_HASH_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GOM_HASH_MAP, GXmlGomHashMap))
#define GXML_GOM_HASH_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GOM_HASH_MAP, GXmlGomHashMapClass))
#define GXML_IS_GOM_HASH_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GOM_HASH_MAP))
#define GXML_IS_GOM_HASH_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GOM_HASH_MAP))
#define GXML_GOM_HASH_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GOM_HASH_MAP, GXmlGomHashMapClass))

typedef struct _GXmlGomHashMap GXmlGomHashMap;
typedef struct _GXmlGomHashMapClass GXmlGomHashMapClass;
typedef struct _GXmlGomHashMapPrivate GXmlGomHashMapPrivate;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))

#define GXML_TYPE_MAPPEABLE_ELEMENT_PAIR_KEY (gxml_mappeable_element_pair_key_get_type ())
#define GXML_MAPPEABLE_ELEMENT_PAIR_KEY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_MAPPEABLE_ELEMENT_PAIR_KEY, GXmlMappeableElementPairKey))
#define GXML_IS_MAPPEABLE_ELEMENT_PAIR_KEY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_MAPPEABLE_ELEMENT_PAIR_KEY))
#define GXML_MAPPEABLE_ELEMENT_PAIR_KEY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_MAPPEABLE_ELEMENT_PAIR_KEY, GXmlMappeableElementPairKeyIface))

typedef struct _GXmlMappeableElementPairKey GXmlMappeableElementPairKey;
typedef struct _GXmlMappeableElementPairKeyIface GXmlMappeableElementPairKeyIface;

#define GXML_TYPE_GOM_HASH_PAIRED_MAP (gxml_gom_hash_paired_map_get_type ())
#define GXML_GOM_HASH_PAIRED_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GOM_HASH_PAIRED_MAP, GXmlGomHashPairedMap))
#define GXML_GOM_HASH_PAIRED_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GOM_HASH_PAIRED_MAP, GXmlGomHashPairedMapClass))
#define GXML_IS_GOM_HASH_PAIRED_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GOM_HASH_PAIRED_MAP))
#define GXML_IS_GOM_HASH_PAIRED_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GOM_HASH_PAIRED_MAP))
#define GXML_GOM_HASH_PAIRED_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GOM_HASH_PAIRED_MAP, GXmlGomHashPairedMapClass))

typedef struct _GXmlGomHashPairedMap GXmlGomHashPairedMap;
typedef struct _GXmlGomHashPairedMapClass GXmlGomHashPairedMapClass;
typedef struct _GXmlGomHashPairedMapPrivate GXmlGomHashPairedMapPrivate;
#define __g_list_free__g_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_free0_ (var), NULL)))

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;

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

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;

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;

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

struct _GXmlDomHTMLCollectionIface {
	GTypeInterface parent_iface;
	GXmlDomElement* (*get_element) (GXmlDomHTMLCollection* self, gint index);
	GXmlDomElement** (*to_array) (GXmlDomHTMLCollection* self, int* result_length1);
	GXmlDomElement* (*item) (GXmlDomHTMLCollection* self, gint index);
	GXmlDomElement* (*named_item) (GXmlDomHTMLCollection* self, const gchar* name);
	gint (*get_length) (GXmlDomHTMLCollection* 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 _GXmlDomNonDocumentTypeChildNodeIface {
	GTypeInterface parent_iface;
	GXmlDomElement* (*get_previous_element_sibling) (GXmlDomNonDocumentTypeChildNode* self);
	GXmlDomElement* (*get_next_element_sibling) (GXmlDomNonDocumentTypeChildNode* self);
};

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

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

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;

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* (*parentNode) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*firstChild) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*lastChild) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*previousSibling) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*nextSibling) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*previousNode) (GXmlDomTreeWalker* self);
	GXmlDomNode* (*nextNode) (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 _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);
};

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;

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);
	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 _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, int tokens_length1, GError** error);
	void (*remove) (GXmlDomTokenList* self, gchar** tokens, int 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);
	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 _GXmlGomCollectionIface {
	GTypeInterface parent_iface;
	void (*search) (GXmlGomCollection* self, GError** error);
	GXmlDomElement* (*get_item) (GXmlGomCollection* self, gint index, GError** error);
	void (*append) (GXmlGomCollection* self, GXmlDomElement* node, GError** error);
	void (*initialize) (GXmlGomCollection* self, GType t, GError** error);
	GXmlGomElement* (*create_item) (GXmlGomCollection* self);
	gboolean (*validate_append) (GXmlGomCollection* self, gint index, GXmlDomElement* element, GError** error);
	GQueue* (*get_nodes_index) (GXmlGomCollection* self);
	GXmlGomElement* (*get_element) (GXmlGomCollection* self);
	void (*set_element) (GXmlGomCollection* self, GXmlGomElement* value);
	const gchar* (*get_items_name) (GXmlGomCollection* self);
	GType (*get_items_type) (GXmlGomCollection* self);
	void (*set_items_type) (GXmlGomCollection* self, GType value);
	gint (*get_length) (GXmlGomCollection* self);
};

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 _GXmlBaseCollection {
	GObject parent_instance;
	GXmlBaseCollectionPrivate * priv;
	GQueue* _nodes_index;
	GXmlGomElement* _element;
	gchar* _items_name;
	GType _items_type;
};

struct _GXmlBaseCollectionClass {
	GObjectClass parent_class;
	gboolean (*validate_append) (GXmlBaseCollection* self, gint index, GXmlDomElement* element, GError** error);
};

struct _GXmlGomObjectIface {
	GTypeInterface parent_iface;
	GList* (*get_properties_list) (GXmlGomObject* self);
	GParamSpec* (*find_property_name) (GXmlGomObject* self, const gchar* pname);
	GParamSpec* (*find_object_property_name) (GXmlGomObject* self, const gchar* pname);
	GList* (*get_property_element_list) (GXmlGomObject* self);
	gchar* (*get_property_string) (GXmlGomObject* self, GParamSpec* prop);
	gchar* (*get_attribute) (GXmlGomObject* self, const gchar* name);
	gboolean (*set_attribute) (GXmlGomObject* self, const gchar* name, const gchar* val);
	GXmlDomElement* (*get_child) (GXmlGomObject* self, const gchar* name);
	GXmlDomElementList* (*find_elements) (GXmlGomObject* self, const gchar* name);
	gboolean (*remove_attribute) (GXmlGomObject* self, const gchar* name);
	gboolean (*set_instance_property) (GXmlGomObject* self, const gchar* name);
	void (*clean_property_elements) (GXmlGomObject* self, const gchar* name, GError** error);
};

struct _GXmlGomArrayList {
	GXmlBaseCollection parent_instance;
	GXmlGomArrayListPrivate * priv;
};

struct _GXmlGomArrayListClass {
	GXmlBaseCollectionClass parent_class;
};

struct _GXmlMappeableElementIface {
	GTypeInterface parent_iface;
	gchar* (*get_map_key) (GXmlMappeableElement* self);
};

struct _GXmlGomHashMap {
	GXmlBaseCollection parent_instance;
	GXmlGomHashMapPrivate * priv;
	GHashTable* _hashtable;
	gchar* _attribute_key;
};

struct _GXmlGomHashMapClass {
	GXmlBaseCollectionClass parent_class;
};

struct _GXmlMappeableElementPairKeyIface {
	GTypeInterface parent_iface;
	gchar* (*get_map_primary_key) (GXmlMappeableElementPairKey* self);
	gchar* (*get_map_secondary_key) (GXmlMappeableElementPairKey* self);
};

struct _GXmlGomHashPairedMap {
	GXmlBaseCollection parent_instance;
	GXmlGomHashPairedMapPrivate * priv;
	GHashTable* _hashtable;
	gchar* _attribute_primary_key;
	gchar* _attribute_secondary_key;
};

struct _GXmlGomHashPairedMapClass {
	GXmlBaseCollectionClass parent_class;
};


static gpointer gxml_base_collection_parent_class = NULL;
static gpointer gxml_gom_array_list_parent_class = NULL;
static GXmlGomCollectionIface* gxml_gom_array_list_gxml_gom_collection_parent_iface = NULL;
static gpointer gxml_gom_hash_map_parent_class = NULL;
static GXmlGomCollectionIface* gxml_gom_hash_map_gxml_gom_collection_parent_iface = NULL;
static gpointer gxml_gom_hash_paired_map_parent_class = NULL;
static GXmlGomCollectionIface* gxml_gom_hash_paired_map_gxml_gom_collection_parent_iface = NULL;

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_node_list_get_type (void) G_GNUC_CONST;
GType gxml_dom_element_list_get_type (void) G_GNUC_CONST;
GType gxml_dom_html_collection_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_non_document_type_child_node_get_type (void) G_GNUC_CONST;
GType gxml_dom_child_node_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_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_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_gom_node_get_type (void) G_GNUC_CONST;
GType gxml_gom_element_get_type (void) G_GNUC_CONST;
GType gxml_gom_collection_get_type (void) G_GNUC_CONST;
void gxml_gom_collection_search (GXmlGomCollection* self, GError** error);
GXmlDomElement* gxml_gom_collection_get_item (GXmlGomCollection* self, gint index, GError** error);
static GXmlDomElement* gxml_gom_collection_real_get_item (GXmlGomCollection* self, gint index, GError** error);
GQueue* gxml_gom_collection_get_nodes_index (GXmlGomCollection* self);
GQuark gxml_dom_error_quark (void);
GXmlGomElement* gxml_gom_collection_get_element (GXmlGomCollection* self);
GXmlDomNodeList* gxml_dom_node_get_child_nodes (GXmlDomNode* self);
void gxml_gom_collection_append (GXmlGomCollection* self, GXmlDomElement* node, GError** error);
void gxml_gom_collection_initialize (GXmlGomCollection* self, GType t, GError** error);
GXmlGomElement* gxml_gom_collection_create_item (GXmlGomCollection* self);
static GXmlGomElement* gxml_gom_collection_real_create_item (GXmlGomCollection* self);
GType gxml_gom_collection_get_items_type (GXmlGomCollection* self);
GXmlDomDocument* gxml_dom_node_get_owner_document (GXmlDomNode* self);
gboolean gxml_gom_collection_validate_append (GXmlGomCollection* self, gint index, GXmlDomElement* element, GError** error);
void gxml_gom_collection_set_element (GXmlGomCollection* self, GXmlGomElement* value);
const gchar* gxml_gom_collection_get_items_name (GXmlGomCollection* self);
void gxml_gom_collection_set_items_type (GXmlGomCollection* self, GType value);
gint gxml_gom_collection_get_length (GXmlGomCollection* self);
GType gxml_base_collection_get_type (void) G_GNUC_CONST;
enum  {
	GXML_BASE_COLLECTION_DUMMY_PROPERTY,
	GXML_BASE_COLLECTION_ITEMS_NAME,
	GXML_BASE_COLLECTION_ITEMS_TYPE,
	GXML_BASE_COLLECTION_NODES_INDEX,
	GXML_BASE_COLLECTION_ELEMENT
};
void gxml_base_collection_initialize (GXmlBaseCollection* self, GType items_type, GError** error);
gchar* gxml_dom_element_get_local_name (GXmlDomElement* self);
void gxml_base_collection_initialize_element (GXmlBaseCollection* self, GXmlGomElement* e, GError** error);
void gxml_base_collection_search (GXmlBaseCollection* self, GError** error);
void gxml_base_collection_append (GXmlBaseCollection* self, GXmlDomElement* node, GError** error);
GXmlDomNode* gxml_dom_node_append_child (GXmlDomNode* self, GXmlDomNode* node, GError** error);
gboolean gxml_base_collection_validate_append (GXmlBaseCollection* self, gint index, GXmlDomElement* element, GError** error);
GType gxml_gom_object_get_type (void) G_GNUC_CONST;
const gchar* gxml_base_collection_get_items_name (GXmlBaseCollection* self);
static gboolean gxml_base_collection_real_validate_append (GXmlBaseCollection* self, gint index, GXmlDomElement* element, GError** error);
GXmlBaseCollection* gxml_base_collection_construct (GType object_type);
GType gxml_base_collection_get_items_type (GXmlBaseCollection* self);
void gxml_base_collection_set_items_type (GXmlBaseCollection* self, GType value);
GQueue* gxml_base_collection_get_nodes_index (GXmlBaseCollection* self);
GXmlGomElement* gxml_base_collection_get_element (GXmlBaseCollection* self);
void gxml_base_collection_set_element (GXmlBaseCollection* self, GXmlGomElement* value);
static void gxml_base_collection_finalize (GObject* obj);
static void _vala_gxml_base_collection_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_gxml_base_collection_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType gxml_gom_array_list_get_type (void) G_GNUC_CONST;
enum  {
	GXML_GOM_ARRAY_LIST_DUMMY_PROPERTY
};
static gboolean gxml_gom_array_list_real_validate_append (GXmlGomCollection* base, gint index, GXmlDomElement* element, GError** error);
GXmlGomArrayList* gxml_gom_array_list_new (void);
GXmlGomArrayList* gxml_gom_array_list_construct (GType object_type);
GType gxml_mappeable_element_get_type (void) G_GNUC_CONST;
gchar* gxml_mappeable_element_get_map_key (GXmlMappeableElement* self);
GType gxml_gom_hash_map_get_type (void) G_GNUC_CONST;
enum  {
	GXML_GOM_HASH_MAP_DUMMY_PROPERTY,
	GXML_GOM_HASH_MAP_ATTRIBUTE_KEY
};
static void _g_free0_ (gpointer var);
void gxml_gom_hash_map_initialize_element_with_key (GXmlGomHashMap* self, GXmlGomElement* element, GType items_type, const gchar* attribute_key, GError** error);
void gxml_gom_hash_map_initialize_with_key (GXmlGomHashMap* self, GType items_type, const gchar* attribute_key, GError** error);
GXmlDomElement* gxml_gom_hash_map_get (GXmlGomHashMap* self, const gchar* key);
gboolean gxml_gom_hash_map_has_key (GXmlGomHashMap* self, const gchar* key);
GList* gxml_gom_hash_map_get_keys (GXmlGomHashMap* self);
static gboolean gxml_gom_hash_map_real_validate_append (GXmlGomCollection* base, gint index, GXmlDomElement* element, GError** error);
const gchar* gxml_gom_hash_map_get_attribute_key (GXmlGomHashMap* self);
gchar* gxml_dom_element_get_attribute (GXmlDomElement* self, const gchar* name);
GXmlGomHashMap* gxml_gom_hash_map_new (void);
GXmlGomHashMap* gxml_gom_hash_map_construct (GType object_type);
void gxml_gom_hash_map_set_attribute_key (GXmlGomHashMap* self, const gchar* value);
static void gxml_gom_hash_map_finalize (GObject* obj);
static void _vala_gxml_gom_hash_map_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_gxml_gom_hash_map_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType gxml_mappeable_element_pair_key_get_type (void) G_GNUC_CONST;
gchar* gxml_mappeable_element_pair_key_get_map_primary_key (GXmlMappeableElementPairKey* self);
gchar* gxml_mappeable_element_pair_key_get_map_secondary_key (GXmlMappeableElementPairKey* self);
GType gxml_gom_hash_paired_map_get_type (void) G_GNUC_CONST;
enum  {
	GXML_GOM_HASH_PAIRED_MAP_DUMMY_PROPERTY,
	GXML_GOM_HASH_PAIRED_MAP_ATTRIBUTE_PRIMARY_KEY,
	GXML_GOM_HASH_PAIRED_MAP_ATTRIBUTE_SECONDARY_KEY
};
static void _g_hash_table_unref0_ (gpointer var);
void gxml_gom_hash_paired_map_initialize_element_with_keys (GXmlGomHashPairedMap* self, GXmlGomElement* element, GType items_type, const gchar* attribute_primary_key, const gchar* attribute_secondary_key, GError** error);
void gxml_gom_hash_paired_map_initialize_with_keys (GXmlGomHashPairedMap* self, GType items_type, const gchar* attribute_primary_key, const gchar* attribute_secondary_key, GError** error);
GXmlDomElement* gxml_gom_hash_paired_map_get (GXmlGomHashPairedMap* self, const gchar* primary_key, const gchar* secondary_key);
gboolean gxml_gom_hash_paired_map_has_primary_key (GXmlGomHashPairedMap* self, const gchar* key);
gboolean gxml_gom_hash_paired_map_has_secondary_key (GXmlGomHashPairedMap* self, const gchar* pkey, const gchar* key);
GList* gxml_gom_hash_paired_map_get_primary_keys (GXmlGomHashPairedMap* self);
GList* gxml_gom_hash_paired_map_get_secondary_keys (GXmlGomHashPairedMap* self, const gchar* pkey);
static void _g_list_free__g_free0_ (GList* self);
static gboolean gxml_gom_hash_paired_map_real_validate_append (GXmlGomCollection* base, gint index, GXmlDomElement* element, GError** error);
const gchar* gxml_gom_hash_paired_map_get_attribute_primary_key (GXmlGomHashPairedMap* self);
const gchar* gxml_gom_hash_paired_map_get_attribute_secondary_key (GXmlGomHashPairedMap* self);
GXmlGomHashPairedMap* gxml_gom_hash_paired_map_new (void);
GXmlGomHashPairedMap* gxml_gom_hash_paired_map_construct (GType object_type);
void gxml_gom_hash_paired_map_set_attribute_primary_key (GXmlGomHashPairedMap* self, const gchar* value);
void gxml_gom_hash_paired_map_set_attribute_secondary_key (GXmlGomHashPairedMap* self, const gchar* value);
static void gxml_gom_hash_paired_map_finalize (GObject* obj);
static void _vala_gxml_gom_hash_paired_map_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_gxml_gom_hash_paired_map_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


/**
   * Search and add references to all {@link GomObject} nodes as child of
   * {@link element} with same, case insensitive, name of {@link items_name}
   */
void gxml_gom_collection_search (GXmlGomCollection* self, GError** error) {
	g_return_if_fail (self != NULL);
	GXML_GOM_COLLECTION_GET_INTERFACE (self)->search (self, error);
}


/**
   * Gets a child {@link DomElement} of {@link element} referenced in
   * {@link nodes_index}.
   */
static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static GXmlDomElement* gxml_gom_collection_real_get_item (GXmlGomCollection* self, gint index, GError** error) {
	GXmlDomElement* result = NULL;
	GQueue* _tmp0_ = NULL;
	GQueue* _tmp1_ = NULL;
	guint _tmp2_ = 0U;
	gboolean _tmp3_ = FALSE;
	gint _tmp4_ = 0;
	gint i = 0;
	GQueue* _tmp11_ = NULL;
	GQueue* _tmp12_ = NULL;
	gint _tmp13_ = 0;
	gconstpointer _tmp14_ = NULL;
	gboolean _tmp15_ = FALSE;
	gint _tmp16_ = 0;
	GXmlDomNode* e = NULL;
	GXmlGomElement* _tmp27_ = NULL;
	GXmlGomElement* _tmp28_ = NULL;
	GXmlDomNodeList* _tmp29_ = NULL;
	GXmlDomNodeList* _tmp30_ = NULL;
	GXmlDomNodeList* _tmp31_ = NULL;
	gint _tmp32_ = 0;
	gpointer _tmp33_ = NULL;
	GXmlDomNode* _tmp34_ = NULL;
	GXmlDomNode* _tmp35_ = NULL;
	GXmlDomNode* _tmp39_ = NULL;
	GXmlDomElement* _tmp40_ = NULL;
	GError * _inner_error_ = NULL;
	_tmp0_ = gxml_gom_collection_get_nodes_index (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->length;
	if (_tmp2_ == ((guint) 0)) {
		result = NULL;
		return result;
	}
	_tmp4_ = index;
	if (_tmp4_ < 0) {
		_tmp3_ = TRUE;
	} else {
		gint _tmp5_ = 0;
		GQueue* _tmp6_ = NULL;
		GQueue* _tmp7_ = NULL;
		guint _tmp8_ = 0U;
		_tmp5_ = index;
		_tmp6_ = gxml_gom_collection_get_nodes_index (self);
		_tmp7_ = _tmp6_;
		_tmp8_ = _tmp7_->length;
		_tmp3_ = ((guint) _tmp5_) >= _tmp8_;
	}
	if (_tmp3_) {
		const gchar* _tmp9_ = NULL;
		GError* _tmp10_ = NULL;
		_tmp9_ = _ ("Invalid index for elements in array list");
		_tmp10_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_INDEX_SIZE_ERROR, _tmp9_);
		_inner_error_ = _tmp10_;
		g_propagate_error (error, _inner_error_);
		return NULL;
	}
	_tmp11_ = gxml_gom_collection_get_nodes_index (self);
	_tmp12_ = _tmp11_;
	_tmp13_ = index;
	_tmp14_ = g_queue_peek_nth (_tmp12_, (guint) _tmp13_);
	i = (gint) ((gintptr) _tmp14_);
	_tmp16_ = i;
	if (_tmp16_ < 0) {
		_tmp15_ = TRUE;
	} else {
		gint _tmp17_ = 0;
		GXmlGomElement* _tmp18_ = NULL;
		GXmlGomElement* _tmp19_ = NULL;
		GXmlDomNodeList* _tmp20_ = NULL;
		GXmlDomNodeList* _tmp21_ = NULL;
		GXmlDomNodeList* _tmp22_ = NULL;
		gint _tmp23_ = 0;
		gint _tmp24_ = 0;
		_tmp17_ = i;
		_tmp18_ = gxml_gom_collection_get_element (self);
		_tmp19_ = _tmp18_;
		_tmp20_ = gxml_dom_node_get_child_nodes ((GXmlDomNode*) _tmp19_);
		_tmp21_ = _tmp20_;
		_tmp22_ = _tmp21_;
		_tmp23_ = gee_collection_get_size ((GeeCollection*) _tmp22_);
		_tmp24_ = _tmp23_;
		_tmp15_ = _tmp17_ >= _tmp24_;
		_g_object_unref0 (_tmp22_);
	}
	if (_tmp15_) {
		const gchar* _tmp25_ = NULL;
		GError* _tmp26_ = NULL;
		_tmp25_ = _ ("Invalid index reference for child elements in array list");
		_tmp26_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_INDEX_SIZE_ERROR, _tmp25_);
		_inner_error_ = _tmp26_;
		g_propagate_error (error, _inner_error_);
		return NULL;
	}
	_tmp27_ = gxml_gom_collection_get_element (self);
	_tmp28_ = _tmp27_;
	_tmp29_ = gxml_dom_node_get_child_nodes ((GXmlDomNode*) _tmp28_);
	_tmp30_ = _tmp29_;
	_tmp31_ = _tmp30_;
	_tmp32_ = i;
	_tmp33_ = gee_list_get ((GeeList*) _tmp31_, _tmp32_);
	_tmp34_ = (GXmlDomNode*) _tmp33_;
	_g_object_unref0 (_tmp31_);
	e = _tmp34_;
	_tmp35_ = e;
	if (_tmp35_ != NULL) {
		GXmlDomNode* _tmp36_ = NULL;
		_tmp36_ = e;
		if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp36_, GXML_TYPE_GOM_ELEMENT)) {
			const gchar* _tmp37_ = NULL;
			GError* _tmp38_ = NULL;
			_tmp37_ = _ ("Referenced object's type is invalid. Should be a GXmlGomElement");
			_tmp38_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_INVALID_NODE_TYPE_ERROR, _tmp37_);
			_inner_error_ = _tmp38_;
			g_propagate_error (error, _inner_error_);
			_g_object_unref0 (e);
			return NULL;
		}
	}
	_tmp39_ = e;
	_tmp40_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, GXML_TYPE_DOM_ELEMENT, GXmlDomElement));
	result = _tmp40_;
	_g_object_unref0 (e);
	return result;
}


GXmlDomElement* gxml_gom_collection_get_item (GXmlGomCollection* self, gint index, GError** error) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_GOM_COLLECTION_GET_INTERFACE (self)->get_item (self, index, error);
}


/**
   * Adds a {@link DomElement} node to this collection. Depending on type of
   * collection, this method will take information from node to initialize
   * how to find it.
   */
void gxml_gom_collection_append (GXmlGomCollection* self, GXmlDomElement* node, GError** error) {
	g_return_if_fail (self != NULL);
	GXML_GOM_COLLECTION_GET_INTERFACE (self)->append (self, node, error);
}


/**
   * Initialize collection to use a given {@link GomElement} derived type.
   * Internally, this method create an instance of given type to initialize
   * {@link items_type} and {@link items_name}.
   *
   * This method can be used at construction time of classes implementing
   * {@link GomCollection} to initialize object type to refer in collection.
   */
void gxml_gom_collection_initialize (GXmlGomCollection* self, GType t, GError** error) {
	g_return_if_fail (self != NULL);
	GXML_GOM_COLLECTION_GET_INTERFACE (self)->initialize (self, t, error);
}


/**
   * Creates a new instance of {@link items_type}, with same
   * {@link DomNode.owner_document} than {@link element}. New instance
   * is not set as a child of collection's {@link element}; to do so,
   * use {@link append}
   *
   * Returns: a new instance object or null if type is not a {@link GomElement} or no parent has been set
   */
static GXmlGomElement* gxml_gom_collection_real_create_item (GXmlGomCollection* self) {
	GXmlGomElement* result = NULL;
	GType _tmp0_ = 0UL;
	GType _tmp1_ = 0UL;
	gboolean _tmp2_ = FALSE;
	GType _tmp3_ = 0UL;
	GType _tmp4_ = 0UL;
	gboolean _tmp5_ = FALSE;
	GXmlGomElement* _tmp6_ = NULL;
	GXmlGomElement* _tmp7_ = NULL;
	GType _tmp8_ = 0UL;
	GType _tmp9_ = 0UL;
	GXmlGomElement* _tmp10_ = NULL;
	GXmlGomElement* _tmp11_ = NULL;
	GXmlDomDocument* _tmp12_ = NULL;
	GXmlDomDocument* _tmp13_ = NULL;
	GObject* _tmp14_ = NULL;
	GObject* _tmp15_ = NULL;
	GXmlGomElement* _tmp16_ = NULL;
	_tmp0_ = gxml_gom_collection_get_items_type (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_type_is_a (_tmp1_, G_TYPE_INVALID);
	if (_tmp2_) {
		result = NULL;
		return result;
	}
	_tmp3_ = gxml_gom_collection_get_items_type (self);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_type_is_a (_tmp4_, GXML_TYPE_GOM_ELEMENT);
	if (!_tmp5_) {
		result = NULL;
		return result;
	}
	_tmp6_ = gxml_gom_collection_get_element (self);
	_tmp7_ = _tmp6_;
	if (_tmp7_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp8_ = gxml_gom_collection_get_items_type (self);
	_tmp9_ = _tmp8_;
	_tmp10_ = gxml_gom_collection_get_element (self);
	_tmp11_ = _tmp10_;
	_tmp12_ = gxml_dom_node_get_owner_document ((GXmlDomNode*) _tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = g_object_new (_tmp9_, "owner_document", _tmp13_, NULL);
	_tmp15_ = G_IS_INITIALLY_UNOWNED (_tmp14_) ? g_object_ref_sink (_tmp14_) : _tmp14_;
	_tmp16_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp15_, GXML_TYPE_GOM_ELEMENT) ? ((GXmlGomElement*) _tmp15_) : NULL;
	if (_tmp16_ == NULL) {
		_g_object_unref0 (_tmp15_);
	}
	result = _tmp16_;
	return result;
}


GXmlGomElement* gxml_gom_collection_create_item (GXmlGomCollection* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_GOM_COLLECTION_GET_INTERFACE (self)->create_item (self);
}


/**
   * Validate if given node and index, should be added to collection.
   *
   * Implementations should use this method to perform any action before
   * element is added to collection, like setup internal pointers to given
   * index, in order to get access to referenced node.
   *
   * Return: true if node and index should be added to collection.
   */
gboolean gxml_gom_collection_validate_append (GXmlGomCollection* self, gint index, GXmlDomElement* element, GError** error) {
	g_return_val_if_fail (self != NULL, FALSE);
	return GXML_GOM_COLLECTION_GET_INTERFACE (self)->validate_append (self, index, element, error);
}


GQueue* gxml_gom_collection_get_nodes_index (GXmlGomCollection* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_GOM_COLLECTION_GET_INTERFACE (self)->get_nodes_index (self);
}


GXmlGomElement* gxml_gom_collection_get_element (GXmlGomCollection* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_GOM_COLLECTION_GET_INTERFACE (self)->get_element (self);
}


void gxml_gom_collection_set_element (GXmlGomCollection* self, GXmlGomElement* value) {
	g_return_if_fail (self != NULL);
	GXML_GOM_COLLECTION_GET_INTERFACE (self)->set_element (self, value);
}


const gchar* gxml_gom_collection_get_items_name (GXmlGomCollection* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_GOM_COLLECTION_GET_INTERFACE (self)->get_items_name (self);
}


GType gxml_gom_collection_get_items_type (GXmlGomCollection* self) {
	g_return_val_if_fail (self != NULL, 0UL);
	return GXML_GOM_COLLECTION_GET_INTERFACE (self)->get_items_type (self);
}


void gxml_gom_collection_set_items_type (GXmlGomCollection* self, GType value) {
	g_return_if_fail (self != NULL);
	GXML_GOM_COLLECTION_GET_INTERFACE (self)->set_items_type (self, value);
}


gint gxml_gom_collection_get_length (GXmlGomCollection* self) {
	g_return_val_if_fail (self != NULL, 0);
	return GXML_GOM_COLLECTION_GET_INTERFACE (self)->get_length (self);
}


static gint gxml_gom_collection_real_get_length (GXmlGomCollection* base) {
	gint result;
	GXmlGomCollection* self;
	GQueue* _tmp0_ = NULL;
	GQueue* _tmp1_ = NULL;
	guint _tmp2_ = 0U;
	self = base;
	_tmp0_ = gxml_gom_collection_get_nodes_index (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_queue_get_length (_tmp1_);
	result = (gint) _tmp2_;
	return result;
}


static void gxml_gom_collection_base_init (GXmlGomCollectionIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
		/**
		   * A list of child {@link DomElement} objects of {@link element}
		   */
		g_object_interface_install_property (iface, g_param_spec_pointer ("nodes-index", "nodes-index", "nodes-index", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
		/**
		   * A {@link GomElement} with all child elements in collection.
		   */
		g_object_interface_install_property (iface, g_param_spec_object ("element", "element", "element", GXML_TYPE_GOM_ELEMENT, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
		/**
		   * Local name of {@link DomElement} objects of {@link element}, which could be
		   * contained in this collection.
		   *
		   * Used when reading to add elements to collection.
		   */
		g_object_interface_install_property (iface, g_param_spec_string ("items-name", "items-name", "items-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
		/**
		   * A {@link GLib.Type} of {@link DomElement} child objects of {@link element},
		   * which could be contained in this collection.
		   *
		   * Type should be an {@link GomObject}.
		   */
		g_object_interface_install_property (iface, g_param_spec_gtype ("items-type", "items-type", "items-type", G_TYPE_NONE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
		iface->get_item = gxml_gom_collection_real_get_item;
		iface->create_item = gxml_gom_collection_real_create_item;
		iface->get_length = gxml_gom_collection_real_get_length;
	}
}


/**
 * An interface to keep references to {@link DomElement} in a {@link element}
 * child nodes. Only {@link GomObject} are supported.
 */
GType gxml_gom_collection_get_type (void) {
	static volatile gsize gxml_gom_collection_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_gom_collection_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlGomCollectionIface), (GBaseInitFunc) gxml_gom_collection_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType gxml_gom_collection_type_id;
		gxml_gom_collection_type_id = g_type_register_static (G_TYPE_INTERFACE, "GXmlGomCollection", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (gxml_gom_collection_type_id, G_TYPE_OBJECT);
		g_once_init_leave (&gxml_gom_collection_type_id__volatile, gxml_gom_collection_type_id);
	}
	return gxml_gom_collection_type_id__volatile;
}


/**
   * {@inheritDoc}
   */
void gxml_base_collection_initialize (GXmlBaseCollection* self, GType items_type, GError** error) {
	GType _tmp0_ = 0UL;
	gboolean _tmp1_ = FALSE;
	GXmlGomElement* o = NULL;
	GType _tmp4_ = 0UL;
	GObject* _tmp5_ = NULL;
	GObject* _tmp6_ = NULL;
	GXmlGomElement* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	GType _tmp10_ = 0UL;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = items_type;
	_tmp1_ = g_type_is_a (_tmp0_, GXML_TYPE_GOM_ELEMENT);
	if (!_tmp1_) {
		const gchar* _tmp2_ = NULL;
		GError* _tmp3_ = NULL;
		_tmp2_ = _ ("Invalid attempt to initialize a collection using an unsupported type. " \
"Only GXmlGomElement is supported");
		_tmp3_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_INVALID_NODE_TYPE_ERROR, _tmp2_);
		_inner_error_ = _tmp3_;
		g_propagate_error (error, _inner_error_);
		return;
	}
	_tmp4_ = items_type;
	_tmp5_ = g_object_new (_tmp4_, NULL);
	_tmp6_ = G_IS_INITIALLY_UNOWNED (_tmp5_) ? g_object_ref_sink (_tmp5_) : _tmp5_;
	_tmp7_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, GXML_TYPE_GOM_ELEMENT) ? ((GXmlGomElement*) _tmp6_) : NULL;
	if (_tmp7_ == NULL) {
		_g_object_unref0 (_tmp6_);
	}
	o = _tmp7_;
	_tmp8_ = gxml_dom_element_get_local_name ((GXmlDomElement*) o);
	_tmp9_ = _tmp8_;
	_g_free0 (self->_items_name);
	self->_items_name = _tmp9_;
	_tmp10_ = items_type;
	self->_items_type = _tmp10_;
	_g_object_unref0 (o);
}


/**
   * Initialize an {@link GomCollection} to use an element as children's parent.
   * Searchs for all nodes, calling {@link GomCollection.search}
   * with {@link GomCollection.items_type}, using its
   * {@link DomElement.local_name} to find it.
   *
   * Implemenation classes, should initialize collection to hold a {@link GomElement}
   * derived type using {@link GomCollection.initialize}.
   */
void gxml_base_collection_initialize_element (GXmlBaseCollection* self, GXmlGomElement* e, GError** error) {
	GXmlGomElement* _tmp0_ = NULL;
	GXmlGomElement* _tmp1_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (e != NULL);
	_tmp0_ = e;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->_element);
	self->_element = _tmp1_;
	gxml_base_collection_search (self, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		return;
	}
}


/**
   * Adds an {@link DomElement} of type {@link GomObject} as a child of
   * {@link element}.
   *
   * Object is always added as a child of {@link element}
   * but just added to collection if {@link validate_append} returns true;
   */
void gxml_base_collection_append (GXmlBaseCollection* self, GXmlDomElement* node, GError** error) {
	GXmlGomElement* _tmp0_ = NULL;
	GXmlDomElement* _tmp3_ = NULL;
	GXmlDomElement* _tmp6_ = NULL;
	GXmlDomDocument* _tmp7_ = NULL;
	GXmlDomDocument* _tmp8_ = NULL;
	GXmlGomElement* _tmp9_ = NULL;
	GXmlDomDocument* _tmp10_ = NULL;
	GXmlDomDocument* _tmp11_ = NULL;
	GXmlGomElement* _tmp14_ = NULL;
	GXmlDomElement* _tmp15_ = NULL;
	GXmlDomNode* _tmp16_ = NULL;
	GXmlDomNode* _tmp17_ = NULL;
	GXmlGomElement* _tmp18_ = NULL;
	GXmlDomNodeList* _tmp19_ = NULL;
	GXmlDomNodeList* _tmp20_ = NULL;
	GXmlDomNodeList* _tmp21_ = NULL;
	gint _tmp22_ = 0;
	gint _tmp23_ = 0;
	gboolean _tmp24_ = FALSE;
	gint index = 0;
	GXmlGomElement* _tmp27_ = NULL;
	GXmlDomNodeList* _tmp28_ = NULL;
	GXmlDomNodeList* _tmp29_ = NULL;
	GXmlDomNodeList* _tmp30_ = NULL;
	gint _tmp31_ = 0;
	gint _tmp32_ = 0;
	gint _tmp33_ = 0;
	gboolean _tmp34_ = FALSE;
	gint _tmp35_ = 0;
	GXmlDomElement* _tmp36_ = NULL;
	gboolean _tmp37_ = FALSE;
	GQueue* _tmp38_ = NULL;
	gint _tmp39_ = 0;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (node != NULL);
	_tmp0_ = self->_element;
	if (_tmp0_ == NULL) {
		const gchar* _tmp1_ = NULL;
		GError* _tmp2_ = NULL;
		_tmp1_ = _ ("Parent Element is invalid");
		_tmp2_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_INVALID_NODE_TYPE_ERROR, _tmp1_);
		_inner_error_ = _tmp2_;
		g_propagate_error (error, _inner_error_);
		return;
	}
	_tmp3_ = node;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, GXML_TYPE_GOM_ELEMENT)) {
		const gchar* _tmp4_ = NULL;
		GError* _tmp5_ = NULL;
		_tmp4_ = _ ("Invalid attempt to set unsupported type. Only GXmlGomElement is suppor" \
"ted");
		_tmp5_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_INVALID_NODE_TYPE_ERROR, _tmp4_);
		_inner_error_ = _tmp5_;
		g_propagate_error (error, _inner_error_);
		return;
	}
	_tmp6_ = node;
	_tmp7_ = gxml_dom_node_get_owner_document ((GXmlDomNode*) _tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = self->_element;
	_tmp10_ = gxml_dom_node_get_owner_document ((GXmlDomNode*) _tmp9_);
	_tmp11_ = _tmp10_;
	if (_tmp8_ != _tmp11_) {
		const gchar* _tmp12_ = NULL;
		GError* _tmp13_ = NULL;
		_tmp12_ = _ ("Invalid attempt to set a node with a different parent document");
		_tmp13_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_HIERARCHY_REQUEST_ERROR, _tmp12_);
		_inner_error_ = _tmp13_;
		g_propagate_error (error, _inner_error_);
		return;
	}
	_tmp14_ = self->_element;
	_tmp15_ = node;
	_tmp16_ = gxml_dom_node_append_child ((GXmlDomNode*) _tmp14_, (GXmlDomNode*) _tmp15_, &_inner_error_);
	_tmp17_ = _tmp16_;
	_g_object_unref0 (_tmp17_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		return;
	}
	_tmp18_ = self->_element;
	_tmp19_ = gxml_dom_node_get_child_nodes ((GXmlDomNode*) _tmp18_);
	_tmp20_ = _tmp19_;
	_tmp21_ = _tmp20_;
	_tmp22_ = gee_collection_get_size ((GeeCollection*) _tmp21_);
	_tmp23_ = _tmp22_;
	_tmp24_ = _tmp23_ == 0;
	_g_object_unref0 (_tmp21_);
	if (_tmp24_) {
		const gchar* _tmp25_ = NULL;
		GError* _tmp26_ = NULL;
		_tmp25_ = _ ("Node element not appended as child of parent. No node added to collect" \
"ion");
		_tmp26_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_QUOTA_EXCEEDED_ERROR, _tmp25_);
		_inner_error_ = _tmp26_;
		g_propagate_error (error, _inner_error_);
		return;
	}
	_tmp27_ = self->_element;
	_tmp28_ = gxml_dom_node_get_child_nodes ((GXmlDomNode*) _tmp27_);
	_tmp29_ = _tmp28_;
	_tmp30_ = _tmp29_;
	_tmp31_ = gee_collection_get_size ((GeeCollection*) _tmp30_);
	_tmp32_ = _tmp31_;
	_tmp33_ = _tmp32_ - 1;
	_g_object_unref0 (_tmp30_);
	index = _tmp33_;
	_tmp35_ = index;
	_tmp36_ = node;
	_tmp37_ = gxml_base_collection_validate_append (self, _tmp35_, _tmp36_, &_inner_error_);
	_tmp34_ = _tmp37_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		return;
	}
	if (!_tmp34_) {
		return;
	}
	_tmp38_ = self->_nodes_index;
	_tmp39_ = index;
	g_queue_push_tail (_tmp38_, (gpointer) ((gintptr) _tmp39_));
}


/**
   * Search for all child nodes in {@link element} of type {@link GomElement}
   * with a {@link GomElement.local_name} equal to {@link GomCollection.items_name},
   * to add it to collection.
   *
   * Implementations could add additional restrictions to add element to collection.
   */
void gxml_base_collection_search (GXmlBaseCollection* self, GError** error) {
	GQueue* _tmp0_ = NULL;
	GXmlGomElement* _tmp1_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->_nodes_index;
	g_queue_clear (_tmp0_);
	_tmp1_ = self->_element;
	if (_tmp1_ == NULL) {
		const gchar* _tmp2_ = NULL;
		GError* _tmp3_ = NULL;
		_tmp2_ = _ ("Parent Element is invalid");
		_tmp3_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_INVALID_NODE_TYPE_ERROR, _tmp2_);
		_inner_error_ = _tmp3_;
		g_propagate_error (error, _inner_error_);
		return;
	}
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp4_ = FALSE;
			_tmp4_ = TRUE;
			while (TRUE) {
				gint _tmp6_ = 0;
				GXmlGomElement* _tmp7_ = NULL;
				GXmlDomNodeList* _tmp8_ = NULL;
				GXmlDomNodeList* _tmp9_ = NULL;
				GXmlDomNodeList* _tmp10_ = NULL;
				gint _tmp11_ = 0;
				gint _tmp12_ = 0;
				gboolean _tmp13_ = FALSE;
				GXmlDomNode* n = NULL;
				GXmlGomElement* _tmp14_ = NULL;
				GXmlDomNodeList* _tmp15_ = NULL;
				GXmlDomNodeList* _tmp16_ = NULL;
				GXmlDomNodeList* _tmp17_ = NULL;
				gint _tmp18_ = 0;
				gpointer _tmp19_ = NULL;
				GXmlDomNode* _tmp20_ = NULL;
				GXmlDomNode* _tmp21_ = NULL;
				if (!_tmp4_) {
					gint _tmp5_ = 0;
					_tmp5_ = i;
					i = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				_tmp6_ = i;
				_tmp7_ = self->_element;
				_tmp8_ = gxml_dom_node_get_child_nodes ((GXmlDomNode*) _tmp7_);
				_tmp9_ = _tmp8_;
				_tmp10_ = _tmp9_;
				_tmp11_ = gee_collection_get_size ((GeeCollection*) _tmp10_);
				_tmp12_ = _tmp11_;
				_tmp13_ = !(_tmp6_ < _tmp12_);
				_g_object_unref0 (_tmp10_);
				if (_tmp13_) {
					break;
				}
				_tmp14_ = self->_element;
				_tmp15_ = gxml_dom_node_get_child_nodes ((GXmlDomNode*) _tmp14_);
				_tmp16_ = _tmp15_;
				_tmp17_ = _tmp16_;
				_tmp18_ = i;
				_tmp19_ = gee_list_get ((GeeList*) _tmp17_, _tmp18_);
				_tmp20_ = (GXmlDomNode*) _tmp19_;
				_g_object_unref0 (_tmp17_);
				n = _tmp20_;
				_tmp21_ = n;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, GXML_TYPE_GOM_OBJECT)) {
					GXmlDomNode* _tmp22_ = NULL;
					gchar* _tmp23_ = NULL;
					gchar* _tmp24_ = NULL;
					gchar* _tmp25_ = NULL;
					gchar* _tmp26_ = NULL;
					gchar* _tmp27_ = NULL;
					const gchar* _tmp28_ = NULL;
					const gchar* _tmp29_ = NULL;
					gchar* _tmp30_ = NULL;
					gchar* _tmp31_ = NULL;
					gboolean _tmp32_ = FALSE;
					_tmp22_ = n;
					_tmp23_ = gxml_dom_element_get_local_name (G_TYPE_CHECK_INSTANCE_TYPE (_tmp22_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp22_) : NULL);
					_tmp24_ = _tmp23_;
					_tmp25_ = _tmp24_;
					_tmp26_ = g_utf8_strdown (_tmp25_, (gssize) -1);
					_tmp27_ = _tmp26_;
					_tmp28_ = gxml_base_collection_get_items_name (self);
					_tmp29_ = _tmp28_;
					_tmp30_ = g_utf8_strdown (_tmp29_, (gssize) -1);
					_tmp31_ = _tmp30_;
					_tmp32_ = g_strcmp0 (_tmp27_, _tmp31_) == 0;
					_g_free0 (_tmp31_);
					_g_free0 (_tmp27_);
					_g_free0 (_tmp25_);
					if (_tmp32_) {
						gboolean _tmp33_ = FALSE;
						gint _tmp34_ = 0;
						GXmlDomNode* _tmp35_ = NULL;
						gboolean _tmp36_ = FALSE;
						_tmp34_ = i;
						_tmp35_ = n;
						_tmp36_ = gxml_base_collection_validate_append (self, _tmp34_, G_TYPE_CHECK_INSTANCE_TYPE (_tmp35_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp35_) : NULL, &_inner_error_);
						_tmp33_ = _tmp36_;
						if (G_UNLIKELY (_inner_error_ != NULL)) {
							g_propagate_error (error, _inner_error_);
							_g_object_unref0 (n);
							return;
						}
						if (_tmp33_) {
							GQueue* _tmp37_ = NULL;
							gint _tmp38_ = 0;
							_tmp37_ = self->_nodes_index;
							_tmp38_ = i;
							g_queue_push_tail (_tmp37_, (gpointer) ((gintptr) _tmp38_));
						}
					}
				}
				_g_object_unref0 (n);
			}
		}
	}
}


/**
   * {@inheritDoc}
   */
static gboolean gxml_base_collection_real_validate_append (GXmlBaseCollection* self, gint index, GXmlDomElement* element, GError** error) {
	gboolean _tmp0_ = FALSE;
	g_critical ("Type `%s' does not implement abstract method `gxml_base_collection_validate_append'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return _tmp0_;
}


gboolean gxml_base_collection_validate_append (GXmlBaseCollection* self, gint index, GXmlDomElement* element, GError** error) {
	g_return_val_if_fail (self != NULL, FALSE);
	return GXML_BASE_COLLECTION_GET_CLASS (self)->validate_append (self, index, element, error);
}


GXmlBaseCollection* gxml_base_collection_construct (GType object_type) {
	GXmlBaseCollection * self = NULL;
	self = (GXmlBaseCollection*) g_object_new (object_type, NULL);
	return self;
}


const gchar* gxml_base_collection_get_items_name (GXmlBaseCollection* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->_items_name;
	result = _tmp0_;
	return result;
}


GType gxml_base_collection_get_items_type (GXmlBaseCollection* self) {
	GType result;
	GType _tmp0_ = 0UL;
	g_return_val_if_fail (self != NULL, 0UL);
	_tmp0_ = self->_items_type;
	result = _tmp0_;
	return result;
}


void gxml_base_collection_set_items_type (GXmlBaseCollection* self, GType value) {
	GType _tmp0_ = 0UL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->_items_type = _tmp0_;
	g_object_notify ((GObject *) self, "items-type");
}


GQueue* gxml_base_collection_get_nodes_index (GXmlBaseCollection* self) {
	GQueue* result;
	GQueue* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->_nodes_index;
	result = _tmp0_;
	return result;
}


GXmlGomElement* gxml_base_collection_get_element (GXmlBaseCollection* self) {
	GXmlGomElement* result;
	GXmlGomElement* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->_element;
	result = _tmp0_;
	return result;
}


void gxml_base_collection_set_element (GXmlBaseCollection* self, GXmlGomElement* value) {
	GXmlGomElement* _tmp0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	if (_tmp0_ != NULL) {
		GXmlGomElement* _tmp1_ = NULL;
		GXmlGomElement* _tmp2_ = NULL;
		_tmp1_ = value;
		_tmp2_ = _g_object_ref0 (_tmp1_);
		_g_object_unref0 (self->_element);
		self->_element = _tmp2_;
	}
	g_object_notify ((GObject *) self, "element");
}


static void gxml_base_collection_class_init (GXmlBaseCollectionClass * klass) {
	gxml_base_collection_parent_class = g_type_class_peek_parent (klass);
	((GXmlBaseCollectionClass *) klass)->validate_append = (gboolean (*)(GXmlBaseCollection*, gint, GXmlDomElement*, GError**)) gxml_base_collection_real_validate_append;
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_base_collection_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gxml_base_collection_set_property;
	G_OBJECT_CLASS (klass)->finalize = gxml_base_collection_finalize;
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_BASE_COLLECTION_ITEMS_NAME, g_param_spec_string ("items-name", "items-name", "items-name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_BASE_COLLECTION_ITEMS_TYPE, g_param_spec_gtype ("items-type", "items-type", "items-type", G_TYPE_NONE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_BASE_COLLECTION_NODES_INDEX, g_param_spec_pointer ("nodes-index", "nodes-index", "nodes-index", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	   * {@inheritDoc}
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_BASE_COLLECTION_ELEMENT, g_param_spec_object ("element", "element", "element", GXML_TYPE_GOM_ELEMENT, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
}


static void gxml_base_collection_instance_init (GXmlBaseCollection * self) {
	GQueue* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	_tmp0_ = g_queue_new ();
	self->_nodes_index = _tmp0_;
	_tmp1_ = g_strdup ("");
	self->_items_name = _tmp1_;
	self->_items_type = G_TYPE_INVALID;
}


static void gxml_base_collection_finalize (GObject* obj) {
	GXmlBaseCollection * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_BASE_COLLECTION, GXmlBaseCollection);
	_g_queue_free0 (self->_nodes_index);
	_g_object_unref0 (self->_element);
	_g_free0 (self->_items_name);
	G_OBJECT_CLASS (gxml_base_collection_parent_class)->finalize (obj);
}


/**
 * Base class for collections implemeting {@link GomCollection}, priving basic
 * infrastructure.
 *
 * Collections properties should be initialized with current container element
 * in order to be able to add new references to elements. Use {@link initialize_element}
 * to set parent element and {@link search} to find elements for collection.
 */
GType gxml_base_collection_get_type (void) {
	static volatile gsize gxml_base_collection_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_base_collection_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlBaseCollectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_base_collection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlBaseCollection), 0, (GInstanceInitFunc) gxml_base_collection_instance_init, NULL };
		GType gxml_base_collection_type_id;
		gxml_base_collection_type_id = g_type_register_static (G_TYPE_OBJECT, "GXmlBaseCollection", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&gxml_base_collection_type_id__volatile, gxml_base_collection_type_id);
	}
	return gxml_base_collection_type_id__volatile;
}


static void _vala_gxml_base_collection_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GXmlBaseCollection * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_BASE_COLLECTION, GXmlBaseCollection);
	switch (property_id) {
		case GXML_BASE_COLLECTION_ITEMS_NAME:
		g_value_set_string (value, gxml_base_collection_get_items_name (self));
		break;
		case GXML_BASE_COLLECTION_ITEMS_TYPE:
		g_value_set_gtype (value, gxml_base_collection_get_items_type (self));
		break;
		case GXML_BASE_COLLECTION_NODES_INDEX:
		g_value_set_pointer (value, gxml_base_collection_get_nodes_index (self));
		break;
		case GXML_BASE_COLLECTION_ELEMENT:
		g_value_set_object (value, gxml_base_collection_get_element (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_gxml_base_collection_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GXmlBaseCollection * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_BASE_COLLECTION, GXmlBaseCollection);
	switch (property_id) {
		case GXML_BASE_COLLECTION_ITEMS_TYPE:
		gxml_base_collection_set_items_type (self, g_value_get_gtype (value));
		break;
		case GXML_BASE_COLLECTION_ELEMENT:
		gxml_base_collection_set_element (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static gboolean gxml_gom_array_list_real_validate_append (GXmlGomCollection* base, gint index, GXmlDomElement* element, GError** error) {
	GXmlGomArrayList * self;
	gboolean result = FALSE;
	self = (GXmlGomArrayList*) base;
	g_return_val_if_fail (element != NULL, FALSE);
	result = TRUE;
	return result;
}


GXmlGomArrayList* gxml_gom_array_list_construct (GType object_type) {
	GXmlGomArrayList * self = NULL;
	self = (GXmlGomArrayList*) gxml_base_collection_construct (object_type);
	return self;
}


GXmlGomArrayList* gxml_gom_array_list_new (void) {
	return gxml_gom_array_list_construct (GXML_TYPE_GOM_ARRAY_LIST);
}


static void gxml_gom_array_list_class_init (GXmlGomArrayListClass * klass) {
	gxml_gom_array_list_parent_class = g_type_class_peek_parent (klass);
	((GXmlBaseCollectionClass *) klass)->validate_append = (gboolean (*)(GXmlBaseCollection*, gint, GXmlDomElement*, GError**)) gxml_gom_array_list_real_validate_append;
}


static void gxml_gom_array_list_gxml_gom_collection_interface_init (GXmlGomCollectionIface * iface) {
	gxml_gom_array_list_gxml_gom_collection_parent_iface = g_type_interface_peek_parent (iface);
	iface->validate_append = (gboolean (*)(GXmlGomCollection*, gint, GXmlDomElement*, GError**)) gxml_gom_array_list_real_validate_append;
	iface->search = (void (*)(GXmlGomCollection*, GError**)) gxml_base_collection_search;
	iface->append = (void (*)(GXmlGomCollection*, GXmlDomElement*, GError**)) gxml_base_collection_append;
	iface->initialize = (void (*)(GXmlGomCollection*, GType, GError**)) gxml_base_collection_initialize;
	iface->get_nodes_index = (GQueue* (*) (GXmlGomCollection *)) gxml_base_collection_get_nodes_index;
	iface->get_element = (GXmlGomElement* (*) (GXmlGomCollection *)) gxml_base_collection_get_element;
	iface->set_element = (void (*) (GXmlGomCollection *, GXmlGomElement*)) gxml_base_collection_set_element;
	iface->get_items_name = (const gchar* (*) (GXmlGomCollection *)) gxml_base_collection_get_items_name;
	iface->get_items_type = (GType (*) (GXmlGomCollection *)) gxml_base_collection_get_items_type;
	iface->set_items_type = (void (*) (GXmlGomCollection *, GType)) gxml_base_collection_set_items_type;
}


static void gxml_gom_array_list_instance_init (GXmlGomArrayList * self) {
}


/**
 * A class impementing {@link GomCollection} to store references to
 * child {@link DomElement} of {@link GomCollection.element}, using an index.
 *
 * {{{
 *   public class YourObject : GomElement {
 *    [Description (nick="::Name")]
 *    public string name { get; set; }
 *   }
 *   public class YourList : GomArrayList {
 *    construct {
 *      try { initialize (typeof (YourObject)); }
 *      catch (GLib.Error e) {
 *        warning ("Initialization error for collection type: %s : %s"
 *             .printf (get_type ().name(), e.message));
 *      }
 *    }
 *   }
 * }}}
 */
GType gxml_gom_array_list_get_type (void) {
	static volatile gsize gxml_gom_array_list_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_gom_array_list_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlGomArrayListClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_gom_array_list_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlGomArrayList), 0, (GInstanceInitFunc) gxml_gom_array_list_instance_init, NULL };
		static const GInterfaceInfo gxml_gom_collection_info = { (GInterfaceInitFunc) gxml_gom_array_list_gxml_gom_collection_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType gxml_gom_array_list_type_id;
		gxml_gom_array_list_type_id = g_type_register_static (GXML_TYPE_BASE_COLLECTION, "GXmlGomArrayList", &g_define_type_info, 0);
		g_type_add_interface_static (gxml_gom_array_list_type_id, GXML_TYPE_GOM_COLLECTION, &gxml_gom_collection_info);
		g_once_init_leave (&gxml_gom_array_list_type_id__volatile, gxml_gom_array_list_type_id);
	}
	return gxml_gom_array_list_type_id__volatile;
}


gchar* gxml_mappeable_element_get_map_key (GXmlMappeableElement* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_MAPPEABLE_ELEMENT_GET_INTERFACE (self)->get_map_key (self);
}


static void gxml_mappeable_element_base_init (GXmlMappeableElementIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
	}
}


/**
 * Inteface to be implemented by {@link GomElement} derived classes
 * in order to provide a string to be used in {@link GomHashMap} as key.
 *
 * If {@link GomHashMap} has set its {@link GomHashMap.attribute_key}
 * its value has precedence over this method.
 */
GType gxml_mappeable_element_get_type (void) {
	static volatile gsize gxml_mappeable_element_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_mappeable_element_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlMappeableElementIface), (GBaseInitFunc) gxml_mappeable_element_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType gxml_mappeable_element_type_id;
		gxml_mappeable_element_type_id = g_type_register_static (G_TYPE_INTERFACE, "GXmlMappeableElement", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (gxml_mappeable_element_type_id, G_TYPE_OBJECT);
		g_type_interface_add_prerequisite (gxml_mappeable_element_type_id, GXML_TYPE_DOM_ELEMENT);
		g_once_init_leave (&gxml_mappeable_element_type_id__volatile, gxml_mappeable_element_type_id);
	}
	return gxml_mappeable_element_type_id__volatile;
}


static void _g_free0_ (gpointer var) {
	var = (g_free (var), NULL);
}


/**
   * Convenient function to initialize a {@link GomHashMap} collection, using
   * given element, items' type and name.
   */
void gxml_gom_hash_map_initialize_element_with_key (GXmlGomHashMap* self, GXmlGomElement* element, GType items_type, const gchar* attribute_key, GError** error) {
	GType _tmp0_ = 0UL;
	GXmlGomElement* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (element != NULL);
	g_return_if_fail (attribute_key != NULL);
	_tmp0_ = items_type;
	gxml_gom_collection_initialize ((GXmlGomCollection*) self, _tmp0_, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		return;
	}
	_tmp1_ = element;
	gxml_base_collection_initialize_element ((GXmlBaseCollection*) self, _tmp1_, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		return;
	}
	_tmp2_ = attribute_key;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (self->_attribute_key);
	self->_attribute_key = _tmp3_;
	gxml_gom_collection_search ((GXmlGomCollection*) self, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		return;
	}
}


/**
   * Convenient function to initialize a {@link GomHashMap} collection, using
   * given element, items' type and name.
   *
   * Using this method at construction time of derived classes.
   */
void gxml_gom_hash_map_initialize_with_key (GXmlGomHashMap* self, GType items_type, const gchar* attribute_key, GError** error) {
	GType _tmp0_ = 0UL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (attribute_key != NULL);
	_tmp0_ = items_type;
	gxml_gom_collection_initialize ((GXmlGomCollection*) self, _tmp0_, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		return;
	}
	_tmp1_ = attribute_key;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (self->_attribute_key);
	self->_attribute_key = _tmp2_;
}


/**
   * Returns an {@link DomElement} in the collection using a string key.
   */
GXmlDomElement* gxml_gom_hash_map_get (GXmlGomHashMap* self, const gchar* key) {
	GXmlDomElement* result = NULL;
	GHashTable* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gint i = 0;
	GHashTable* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gconstpointer _tmp5_ = NULL;
	GXmlGomElement* _tmp6_ = NULL;
	GXmlDomNodeList* _tmp7_ = NULL;
	GXmlDomNodeList* _tmp8_ = NULL;
	GXmlDomNodeList* _tmp9_ = NULL;
	gint _tmp10_ = 0;
	gpointer _tmp11_ = NULL;
	GXmlDomNode* _tmp12_ = NULL;
	GXmlDomElement* _tmp13_ = NULL;
	GXmlDomElement* _tmp14_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (key != NULL, NULL);
	_tmp0_ = self->_hashtable;
	_tmp1_ = key;
	_tmp2_ = g_hash_table_contains (_tmp0_, _tmp1_);
	if (!_tmp2_) {
		result = NULL;
		return result;
	}
	_tmp3_ = self->_hashtable;
	_tmp4_ = key;
	_tmp5_ = g_hash_table_lookup (_tmp3_, _tmp4_);
	i = (gint) ((gintptr) _tmp5_);
	_tmp6_ = ((GXmlBaseCollection*) self)->_element;
	_tmp7_ = gxml_dom_node_get_child_nodes ((GXmlDomNode*) _tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = _tmp8_;
	_tmp10_ = i;
	_tmp11_ = gee_list_get ((GeeList*) _tmp9_, _tmp10_);
	_tmp12_ = (GXmlDomNode*) _tmp11_;
	_tmp13_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp12_) : NULL;
	if (_tmp13_ == NULL) {
		_g_object_unref0 (_tmp12_);
	}
	_tmp14_ = _tmp13_;
	_g_object_unref0 (_tmp9_);
	result = _tmp14_;
	return result;
}


/**
   * Returns true if @key is used in collection.
   */
gboolean gxml_gom_hash_map_has_key (GXmlGomHashMap* self, const gchar* key) {
	gboolean result = FALSE;
	GHashTable* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (key != NULL, FALSE);
	_tmp0_ = self->_hashtable;
	_tmp1_ = key;
	_tmp2_ = g_hash_table_contains (_tmp0_, _tmp1_);
	if (_tmp2_) {
		result = TRUE;
		return result;
	}
	result = FALSE;
	return result;
}


/**
   * Returns list of keys used in collection.
   */
GList* gxml_gom_hash_map_get_keys (GXmlGomHashMap* self) {
	GList* result = NULL;
	GHashTable* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->_hashtable;
	_tmp1_ = g_hash_table_get_keys (_tmp0_);
	result = _tmp1_;
	return result;
}


/**
   * Validates if given element has a {@link GomHashMap.attribute_key} set,
   * if so adds a new key pointing to given index and returns true.
   *
   * Attribute should be a valid {@link DomElement} attribute or
   * a {@link GomObject} property identified using a nick with a '::' prefix.
   *
   * If there are more elements with same key, they are keep as child nodes
   * but the one in collection will be the last one to be found.
   *
   * Return: false if element should not be added to collection.
   */
static gboolean gxml_gom_hash_map_real_validate_append (GXmlGomCollection* base, gint index, GXmlDomElement* element, GError** error) {
	GXmlGomHashMap * self;
	gboolean result = FALSE;
	GXmlDomElement* _tmp0_ = NULL;
	gchar* key = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp20_ = NULL;
	GHashTable* _tmp21_ = NULL;
	const gchar* _tmp22_ = NULL;
	gchar* _tmp23_ = NULL;
	gint _tmp24_ = 0;
	self = (GXmlGomHashMap*) base;
	g_return_val_if_fail (element != NULL, FALSE);
	_tmp0_ = element;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GXML_TYPE_GOM_ELEMENT)) {
		result = FALSE;
		return result;
	}
	key = NULL;
	_tmp1_ = gxml_gom_hash_map_get_attribute_key (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != NULL) {
		GXmlDomElement* _tmp3_ = NULL;
		const gchar* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		_tmp3_ = element;
		_tmp4_ = gxml_gom_hash_map_get_attribute_key (self);
		_tmp5_ = _tmp4_;
		_tmp6_ = gxml_dom_element_get_attribute (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp3_) : NULL, _tmp5_);
		_g_free0 (key);
		key = _tmp6_;
		_tmp7_ = key;
		if (_tmp7_ == NULL) {
			GXmlDomElement* _tmp8_ = NULL;
			const gchar* _tmp9_ = NULL;
			const gchar* _tmp10_ = NULL;
			gchar* _tmp11_ = NULL;
			gchar* _tmp12_ = NULL;
			gchar* _tmp13_ = NULL;
			_tmp8_ = element;
			_tmp9_ = gxml_gom_hash_map_get_attribute_key (self);
			_tmp10_ = _tmp9_;
			_tmp11_ = g_utf8_strdown (_tmp10_, (gssize) -1);
			_tmp12_ = _tmp11_;
			_tmp13_ = gxml_dom_element_get_attribute (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp8_) : NULL, _tmp12_);
			_g_free0 (key);
			key = _tmp13_;
			_g_free0 (_tmp12_);
		}
	} else {
		GType _tmp14_ = 0UL;
		GType _tmp15_ = 0UL;
		gboolean _tmp16_ = FALSE;
		_tmp14_ = gxml_gom_collection_get_items_type ((GXmlGomCollection*) self);
		_tmp15_ = _tmp14_;
		_tmp16_ = g_type_is_a (_tmp15_, GXML_TYPE_MAPPEABLE_ELEMENT);
		if (_tmp16_) {
			GXmlDomElement* _tmp17_ = NULL;
			GXmlDomElement* _tmp18_ = NULL;
			gchar* _tmp19_ = NULL;
			_tmp17_ = element;
			if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, GXML_TYPE_MAPPEABLE_ELEMENT)) {
				result = FALSE;
				_g_free0 (key);
				return result;
			}
			_tmp18_ = element;
			_tmp19_ = gxml_mappeable_element_get_map_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GXML_TYPE_MAPPEABLE_ELEMENT, GXmlMappeableElement));
			_g_free0 (key);
			key = _tmp19_;
		}
	}
	_tmp20_ = key;
	if (_tmp20_ == NULL) {
		result = FALSE;
		_g_free0 (key);
		return result;
	}
	_tmp21_ = self->_hashtable;
	_tmp22_ = key;
	_tmp23_ = g_strdup (_tmp22_);
	_tmp24_ = index;
	g_hash_table_insert (_tmp21_, _tmp23_, (gpointer) ((gintptr) _tmp24_));
	result = TRUE;
	_g_free0 (key);
	return result;
}


GXmlGomHashMap* gxml_gom_hash_map_construct (GType object_type) {
	GXmlGomHashMap * self = NULL;
	self = (GXmlGomHashMap*) gxml_base_collection_construct (object_type);
	return self;
}


GXmlGomHashMap* gxml_gom_hash_map_new (void) {
	return gxml_gom_hash_map_construct (GXML_TYPE_GOM_HASH_MAP);
}


const gchar* gxml_gom_hash_map_get_attribute_key (GXmlGomHashMap* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->_attribute_key;
	result = _tmp0_;
	return result;
}


void gxml_gom_hash_map_set_attribute_key (GXmlGomHashMap* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->_attribute_key);
	self->_attribute_key = _tmp1_;
	g_object_notify ((GObject *) self, "attribute-key");
}


static void gxml_gom_hash_map_class_init (GXmlGomHashMapClass * klass) {
	gxml_gom_hash_map_parent_class = g_type_class_peek_parent (klass);
	((GXmlBaseCollectionClass *) klass)->validate_append = (gboolean (*)(GXmlBaseCollection*, gint, GXmlDomElement*, GError**)) gxml_gom_hash_map_real_validate_append;
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_gom_hash_map_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gxml_gom_hash_map_set_property;
	G_OBJECT_CLASS (klass)->finalize = gxml_gom_hash_map_finalize;
	/**
	   * An attribute's name in items to be added and used to retrieve elements
	   * as key.
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GOM_HASH_MAP_ATTRIBUTE_KEY, g_param_spec_string ("attribute-key", "attribute-key", "attribute-key", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
}


static void gxml_gom_hash_map_gxml_gom_collection_interface_init (GXmlGomCollectionIface * iface) {
	gxml_gom_hash_map_gxml_gom_collection_parent_iface = g_type_interface_peek_parent (iface);
	iface->validate_append = (gboolean (*)(GXmlGomCollection*, gint, GXmlDomElement*, GError**)) gxml_gom_hash_map_real_validate_append;
	iface->search = (void (*)(GXmlGomCollection*, GError**)) gxml_base_collection_search;
	iface->append = (void (*)(GXmlGomCollection*, GXmlDomElement*, GError**)) gxml_base_collection_append;
	iface->initialize = (void (*)(GXmlGomCollection*, GType, GError**)) gxml_base_collection_initialize;
	iface->get_nodes_index = (GQueue* (*) (GXmlGomCollection *)) gxml_base_collection_get_nodes_index;
	iface->get_element = (GXmlGomElement* (*) (GXmlGomCollection *)) gxml_base_collection_get_element;
	iface->set_element = (void (*) (GXmlGomCollection *, GXmlGomElement*)) gxml_base_collection_set_element;
	iface->get_items_name = (const gchar* (*) (GXmlGomCollection *)) gxml_base_collection_get_items_name;
	iface->get_items_type = (GType (*) (GXmlGomCollection *)) gxml_base_collection_get_items_type;
	iface->set_items_type = (void (*) (GXmlGomCollection *, GType)) gxml_base_collection_set_items_type;
}


static void gxml_gom_hash_map_instance_init (GXmlGomHashMap * self) {
	GHashFunc _tmp0_ = NULL;
	GEqualFunc _tmp1_ = NULL;
	GHashTable* _tmp2_ = NULL;
	_tmp0_ = g_str_hash;
	_tmp1_ = g_str_equal;
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, NULL);
	self->_hashtable = _tmp2_;
}


static void gxml_gom_hash_map_finalize (GObject* obj) {
	GXmlGomHashMap * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_GOM_HASH_MAP, GXmlGomHashMap);
	_g_hash_table_unref0 (self->_hashtable);
	_g_free0 (self->_attribute_key);
	G_OBJECT_CLASS (gxml_gom_hash_map_parent_class)->finalize (obj);
}


/**
 * A class impementing {@link GomCollection} to store references to
 * child {@link DomElement} of {@link GomCollection.element}, using an attribute in
 * items as key or {@link MappeableElement.get_map_key} method if implemented
 * by items to be added. If key is not defined in node, it is not added; but
 * keeps it as a child node of actual {@link GomCollection.element}.
 *
 * If {@link GomElement} to be added is of type {@link GomCollection.items_type}
 * and implements {@link MappeableElement}, you should set {@link GomHashMap.attribute_key}
 * to null in order to use returned value of {@link MappeableElement.get_map_key}
 * as key.
 *
 * {{{
 *   public class YourObject : GomElement {
 *    [Description (nick="::Name")]
 *    public string name { get; set; }
 *   }
 *   public class YourList : GomHashMap {
 *    construct {
 *      try { initialize_with_key (typeof (YourObject),"Name"); }
 *      catch (GLib.Error e) {
 *        warning ("Initialization error for collection type: %s : %s"
 *             .printf (get_type ().name(), e.message));
 *      }
 *    }
 *   }
 * }}}
 */
GType gxml_gom_hash_map_get_type (void) {
	static volatile gsize gxml_gom_hash_map_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_gom_hash_map_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlGomHashMapClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_gom_hash_map_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlGomHashMap), 0, (GInstanceInitFunc) gxml_gom_hash_map_instance_init, NULL };
		static const GInterfaceInfo gxml_gom_collection_info = { (GInterfaceInitFunc) gxml_gom_hash_map_gxml_gom_collection_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType gxml_gom_hash_map_type_id;
		gxml_gom_hash_map_type_id = g_type_register_static (GXML_TYPE_BASE_COLLECTION, "GXmlGomHashMap", &g_define_type_info, 0);
		g_type_add_interface_static (gxml_gom_hash_map_type_id, GXML_TYPE_GOM_COLLECTION, &gxml_gom_collection_info);
		g_once_init_leave (&gxml_gom_hash_map_type_id__volatile, gxml_gom_hash_map_type_id);
	}
	return gxml_gom_hash_map_type_id__volatile;
}


static void _vala_gxml_gom_hash_map_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GXmlGomHashMap * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_GOM_HASH_MAP, GXmlGomHashMap);
	switch (property_id) {
		case GXML_GOM_HASH_MAP_ATTRIBUTE_KEY:
		g_value_set_string (value, gxml_gom_hash_map_get_attribute_key (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_gxml_gom_hash_map_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GXmlGomHashMap * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_GOM_HASH_MAP, GXmlGomHashMap);
	switch (property_id) {
		case GXML_GOM_HASH_MAP_ATTRIBUTE_KEY:
		gxml_gom_hash_map_set_attribute_key (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


gchar* gxml_mappeable_element_pair_key_get_map_primary_key (GXmlMappeableElementPairKey* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_MAPPEABLE_ELEMENT_PAIR_KEY_GET_INTERFACE (self)->get_map_primary_key (self);
}


gchar* gxml_mappeable_element_pair_key_get_map_secondary_key (GXmlMappeableElementPairKey* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return GXML_MAPPEABLE_ELEMENT_PAIR_KEY_GET_INTERFACE (self)->get_map_secondary_key (self);
}


static void gxml_mappeable_element_pair_key_base_init (GXmlMappeableElementPairKeyIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
	}
}


/**
 * Inteface to be implemented by {@link GomElement} derived classes
 * in order to provide a string to be used in {@link GomHashMap} as key.
 *
 * If {@link GomHashMap} has set its {@link GomHashMap.attribute_key}
 * its value has precedence over this method.
 */
GType gxml_mappeable_element_pair_key_get_type (void) {
	static volatile gsize gxml_mappeable_element_pair_key_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_mappeable_element_pair_key_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlMappeableElementPairKeyIface), (GBaseInitFunc) gxml_mappeable_element_pair_key_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType gxml_mappeable_element_pair_key_type_id;
		gxml_mappeable_element_pair_key_type_id = g_type_register_static (G_TYPE_INTERFACE, "GXmlMappeableElementPairKey", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (gxml_mappeable_element_pair_key_type_id, G_TYPE_OBJECT);
		g_type_interface_add_prerequisite (gxml_mappeable_element_pair_key_type_id, GXML_TYPE_DOM_ELEMENT);
		g_once_init_leave (&gxml_mappeable_element_pair_key_type_id__volatile, gxml_mappeable_element_pair_key_type_id);
	}
	return gxml_mappeable_element_pair_key_type_id__volatile;
}


static void _g_hash_table_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL));
}


/**
   * Convenient function to initialize a {@link GomHashMap} collection, using
   * given element, items' type and name.
   */
void gxml_gom_hash_paired_map_initialize_element_with_keys (GXmlGomHashPairedMap* self, GXmlGomElement* element, GType items_type, const gchar* attribute_primary_key, const gchar* attribute_secondary_key, GError** error) {
	GType _tmp0_ = 0UL;
	GXmlGomElement* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (element != NULL);
	g_return_if_fail (attribute_primary_key != NULL);
	g_return_if_fail (attribute_secondary_key != NULL);
	_tmp0_ = items_type;
	gxml_gom_collection_initialize ((GXmlGomCollection*) self, _tmp0_, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		return;
	}
	_tmp1_ = element;
	gxml_base_collection_initialize_element ((GXmlBaseCollection*) self, _tmp1_, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		return;
	}
	_tmp2_ = attribute_primary_key;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (self->_attribute_primary_key);
	self->_attribute_primary_key = _tmp3_;
	_tmp4_ = attribute_secondary_key;
	_tmp5_ = g_strdup (_tmp4_);
	_g_free0 (self->_attribute_secondary_key);
	self->_attribute_secondary_key = _tmp5_;
	gxml_gom_collection_search ((GXmlGomCollection*) self, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		return;
	}
}


/**
   * Convenient function to initialize a {@link GomHashMap} collection, using
   * given element, items' type and name.
   *
   * Using this method at construction time of derived classes.
   */
void gxml_gom_hash_paired_map_initialize_with_keys (GXmlGomHashPairedMap* self, GType items_type, const gchar* attribute_primary_key, const gchar* attribute_secondary_key, GError** error) {
	GType _tmp0_ = 0UL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (attribute_primary_key != NULL);
	g_return_if_fail (attribute_secondary_key != NULL);
	_tmp0_ = items_type;
	gxml_gom_collection_initialize ((GXmlGomCollection*) self, _tmp0_, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		return;
	}
	_tmp1_ = attribute_primary_key;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (self->_attribute_primary_key);
	self->_attribute_primary_key = _tmp2_;
	_tmp3_ = attribute_secondary_key;
	_tmp4_ = g_strdup (_tmp3_);
	_g_free0 (self->_attribute_secondary_key);
	self->_attribute_secondary_key = _tmp4_;
}


/**
   * Returns an {@link DomElement} in the collection using given string keys.
   */
static gpointer _g_hash_table_ref0 (gpointer self) {
	return self ? g_hash_table_ref (self) : NULL;
}


GXmlDomElement* gxml_gom_hash_paired_map_get (GXmlGomHashPairedMap* self, const gchar* primary_key, const gchar* secondary_key) {
	GXmlDomElement* result = NULL;
	GHashTable* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	GHashTable* ht = NULL;
	GHashTable* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gconstpointer _tmp5_ = NULL;
	GHashTable* _tmp6_ = NULL;
	GHashTable* _tmp7_ = NULL;
	GHashTable* _tmp8_ = NULL;
	const gchar* _tmp9_ = NULL;
	gboolean _tmp10_ = FALSE;
	gint i = 0;
	GHashTable* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	gconstpointer _tmp13_ = NULL;
	GXmlGomElement* _tmp14_ = NULL;
	GXmlDomNodeList* _tmp15_ = NULL;
	GXmlDomNodeList* _tmp16_ = NULL;
	GXmlDomNodeList* _tmp17_ = NULL;
	gint _tmp18_ = 0;
	gpointer _tmp19_ = NULL;
	GXmlDomNode* _tmp20_ = NULL;
	GXmlDomElement* _tmp21_ = NULL;
	GXmlDomElement* _tmp22_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (primary_key != NULL, NULL);
	g_return_val_if_fail (secondary_key != NULL, NULL);
	_tmp0_ = self->_hashtable;
	_tmp1_ = primary_key;
	_tmp2_ = g_hash_table_contains (_tmp0_, _tmp1_);
	if (!_tmp2_) {
		result = NULL;
		return result;
	}
	_tmp3_ = self->_hashtable;
	_tmp4_ = primary_key;
	_tmp5_ = g_hash_table_lookup (_tmp3_, _tmp4_);
	_tmp6_ = _g_hash_table_ref0 ((GHashTable*) _tmp5_);
	ht = _tmp6_;
	_tmp7_ = ht;
	if (_tmp7_ == NULL) {
		result = NULL;
		_g_hash_table_unref0 (ht);
		return result;
	}
	_tmp8_ = ht;
	_tmp9_ = secondary_key;
	_tmp10_ = g_hash_table_contains (_tmp8_, _tmp9_);
	if (!_tmp10_) {
		result = NULL;
		_g_hash_table_unref0 (ht);
		return result;
	}
	_tmp11_ = ht;
	_tmp12_ = secondary_key;
	_tmp13_ = g_hash_table_lookup (_tmp11_, _tmp12_);
	i = (gint) ((gintptr) _tmp13_);
	_tmp14_ = ((GXmlBaseCollection*) self)->_element;
	_tmp15_ = gxml_dom_node_get_child_nodes ((GXmlDomNode*) _tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = _tmp16_;
	_tmp18_ = i;
	_tmp19_ = gee_list_get ((GeeList*) _tmp17_, _tmp18_);
	_tmp20_ = (GXmlDomNode*) _tmp19_;
	_tmp21_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp20_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp20_) : NULL;
	if (_tmp21_ == NULL) {
		_g_object_unref0 (_tmp20_);
	}
	_tmp22_ = _tmp21_;
	_g_object_unref0 (_tmp17_);
	result = _tmp22_;
	_g_hash_table_unref0 (ht);
	return result;
}


/**
   * Returns true if @key is used in collection as primery key.
   */
gboolean gxml_gom_hash_paired_map_has_primary_key (GXmlGomHashPairedMap* self, const gchar* key) {
	gboolean result = FALSE;
	GHashTable* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (key != NULL, FALSE);
	_tmp0_ = self->_hashtable;
	_tmp1_ = key;
	_tmp2_ = g_hash_table_contains (_tmp0_, _tmp1_);
	if (_tmp2_) {
		result = TRUE;
		return result;
	}
	result = FALSE;
	return result;
}


/**
   * Returns true if @key is used in collection as secondary key
   * with @pkey as primary.
   */
gboolean gxml_gom_hash_paired_map_has_secondary_key (GXmlGomHashPairedMap* self, const gchar* pkey, const gchar* key) {
	gboolean result = FALSE;
	GHashTable* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	GHashTable* ht = NULL;
	GHashTable* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gconstpointer _tmp5_ = NULL;
	GHashTable* _tmp6_ = NULL;
	GHashTable* _tmp7_ = NULL;
	GHashTable* _tmp8_ = NULL;
	const gchar* _tmp9_ = NULL;
	gboolean _tmp10_ = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (pkey != NULL, FALSE);
	g_return_val_if_fail (key != NULL, FALSE);
	_tmp0_ = self->_hashtable;
	_tmp1_ = pkey;
	_tmp2_ = g_hash_table_contains (_tmp0_, _tmp1_);
	if (!_tmp2_) {
		result = FALSE;
		return result;
	}
	_tmp3_ = self->_hashtable;
	_tmp4_ = pkey;
	_tmp5_ = g_hash_table_lookup (_tmp3_, _tmp4_);
	_tmp6_ = _g_hash_table_ref0 ((GHashTable*) _tmp5_);
	ht = _tmp6_;
	_tmp7_ = ht;
	if (_tmp7_ == NULL) {
		result = FALSE;
		_g_hash_table_unref0 (ht);
		return result;
	}
	_tmp8_ = ht;
	_tmp9_ = key;
	_tmp10_ = g_hash_table_contains (_tmp8_, _tmp9_);
	if (_tmp10_) {
		result = TRUE;
		_g_hash_table_unref0 (ht);
		return result;
	}
	result = FALSE;
	_g_hash_table_unref0 (ht);
	return result;
}


/**
   * Returns list of primary keys used in collection.
   */
GList* gxml_gom_hash_paired_map_get_primary_keys (GXmlGomHashPairedMap* self) {
	GList* result = NULL;
	GHashTable* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->_hashtable;
	_tmp1_ = g_hash_table_get_keys (_tmp0_);
	result = _tmp1_;
	return result;
}


/**
   * Returns list of secondary keys used in collection with @pkey as primary key.
   */
static void _g_list_free__g_free0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_free0_, NULL);
	g_list_free (self);
}


GList* gxml_gom_hash_paired_map_get_secondary_keys (GXmlGomHashPairedMap* self, const gchar* pkey) {
	GList* result = NULL;
	GList* l = NULL;
	GHashTable* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	GHashTable* ht = NULL;
	GHashTable* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gconstpointer _tmp5_ = NULL;
	GHashTable* _tmp6_ = NULL;
	GHashTable* _tmp7_ = NULL;
	GHashTable* _tmp8_ = NULL;
	GList* _tmp9_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (pkey != NULL, NULL);
	l = NULL;
	_tmp0_ = self->_hashtable;
	_tmp1_ = pkey;
	_tmp2_ = g_hash_table_contains (_tmp0_, _tmp1_);
	if (!_tmp2_) {
		result = l;
		return result;
	}
	_tmp3_ = self->_hashtable;
	_tmp4_ = pkey;
	_tmp5_ = g_hash_table_lookup (_tmp3_, _tmp4_);
	_tmp6_ = _g_hash_table_ref0 ((GHashTable*) _tmp5_);
	ht = _tmp6_;
	_tmp7_ = ht;
	if (_tmp7_ == NULL) {
		result = l;
		_g_hash_table_unref0 (ht);
		return result;
	}
	_tmp8_ = ht;
	_tmp9_ = g_hash_table_get_keys (_tmp8_);
	result = _tmp9_;
	_g_hash_table_unref0 (ht);
	__g_list_free__g_free0_0 (l);
	return result;
}


/**
   * Validates if given element has a {@link attribute_primary_key}
   * and {@link attribute_secondary_key} set,
   * if so adds a new keys pointing to given index and returns true.
   *
   * Attribute should be a valid {@link DomElement} attribute or
   * a {@link GomObject} property identified using a nick with a '::' prefix.
   *
   * If there are more elements with same keys, they are keep as child nodes
   * but the one in collection will be the last one to be found.
   *
   * Return: false if element should not be added to collection.
   */
static gboolean gxml_gom_hash_paired_map_real_validate_append (GXmlGomCollection* base, gint index, GXmlDomElement* element, GError** error) {
	GXmlGomHashPairedMap * self;
	gboolean result = FALSE;
	GXmlDomElement* _tmp0_ = NULL;
	gchar* pkey = NULL;
	gchar* skey = NULL;
	gboolean _tmp1_ = FALSE;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gboolean _tmp37_ = FALSE;
	const gchar* _tmp38_ = NULL;
	GHashTable* ht = NULL;
	GHashTable* _tmp40_ = NULL;
	const gchar* _tmp41_ = NULL;
	gconstpointer _tmp42_ = NULL;
	GHashTable* _tmp43_ = NULL;
	GHashTable* _tmp44_ = NULL;
	GHashTable* _tmp48_ = NULL;
	const gchar* _tmp49_ = NULL;
	gchar* _tmp50_ = NULL;
	gint _tmp51_ = 0;
	GHashTable* _tmp52_ = NULL;
	const gchar* _tmp53_ = NULL;
	gboolean _tmp54_ = FALSE;
	self = (GXmlGomHashPairedMap*) base;
	g_return_val_if_fail (element != NULL, FALSE);
	_tmp0_ = element;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GXML_TYPE_GOM_ELEMENT)) {
		result = FALSE;
		return result;
	}
	pkey = NULL;
	skey = NULL;
	_tmp2_ = gxml_gom_hash_paired_map_get_attribute_primary_key (self);
	_tmp3_ = _tmp2_;
	if (_tmp3_ != NULL) {
		const gchar* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		_tmp4_ = gxml_gom_hash_paired_map_get_attribute_secondary_key (self);
		_tmp5_ = _tmp4_;
		_tmp1_ = _tmp5_ != NULL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GXmlDomElement* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		GXmlDomElement* _tmp10_ = NULL;
		const gchar* _tmp11_ = NULL;
		const gchar* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
		gboolean _tmp14_ = FALSE;
		const gchar* _tmp15_ = NULL;
		_tmp6_ = element;
		_tmp7_ = gxml_gom_hash_paired_map_get_attribute_primary_key (self);
		_tmp8_ = _tmp7_;
		_tmp9_ = gxml_dom_element_get_attribute (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp6_) : NULL, _tmp8_);
		_g_free0 (pkey);
		pkey = _tmp9_;
		_tmp10_ = element;
		_tmp11_ = gxml_gom_hash_paired_map_get_attribute_secondary_key (self);
		_tmp12_ = _tmp11_;
		_tmp13_ = gxml_dom_element_get_attribute (G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp10_) : NULL, _tmp12_);
		_g_free0 (skey);
		skey = _tmp13_;
		_tmp15_ = pkey;
		if (_tmp15_ == NULL) {
			_tmp14_ = TRUE;
		} else {
			const gchar* _tmp16_ = NULL;
			_tmp16_ = skey;
			_tmp14_ = _tmp16_ == NULL;
		}
		if (_tmp14_) {
			GXmlDomElement* _tmp17_ = NULL;
			const gchar* _tmp18_ = NULL;
			const gchar* _tmp19_ = NULL;
			gchar* _tmp20_ = NULL;
			gchar* _tmp21_ = NULL;
			gchar* _tmp22_ = NULL;
			GXmlDomElement* _tmp23_ = NULL;
			const gchar* _tmp24_ = NULL;
			const gchar* _tmp25_ = NULL;
			gchar* _tmp26_ = NULL;
			gchar* _tmp27_ = NULL;
			gchar* _tmp28_ = NULL;
			_tmp17_ = element;
			_tmp18_ = gxml_gom_hash_paired_map_get_attribute_primary_key (self);
			_tmp19_ = _tmp18_;
			_tmp20_ = g_utf8_strdown (_tmp19_, (gssize) -1);
			_tmp21_ = _tmp20_;
			_tmp22_ = gxml_dom_element_get_attribute (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp17_) : NULL, _tmp21_);
			_g_free0 (pkey);
			pkey = _tmp22_;
			_g_free0 (_tmp21_);
			_tmp23_ = element;
			_tmp24_ = gxml_gom_hash_paired_map_get_attribute_secondary_key (self);
			_tmp25_ = _tmp24_;
			_tmp26_ = g_utf8_strdown (_tmp25_, (gssize) -1);
			_tmp27_ = _tmp26_;
			_tmp28_ = gxml_dom_element_get_attribute (G_TYPE_CHECK_INSTANCE_TYPE (_tmp23_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp23_) : NULL, _tmp27_);
			_g_free0 (skey);
			skey = _tmp28_;
			_g_free0 (_tmp27_);
		}
	} else {
		GType _tmp29_ = 0UL;
		GType _tmp30_ = 0UL;
		gboolean _tmp31_ = FALSE;
		_tmp29_ = gxml_gom_collection_get_items_type ((GXmlGomCollection*) self);
		_tmp30_ = _tmp29_;
		_tmp31_ = g_type_is_a (_tmp30_, GXML_TYPE_MAPPEABLE_ELEMENT_PAIR_KEY);
		if (_tmp31_) {
			GXmlDomElement* _tmp32_ = NULL;
			GXmlDomElement* _tmp33_ = NULL;
			gchar* _tmp34_ = NULL;
			GXmlDomElement* _tmp35_ = NULL;
			gchar* _tmp36_ = NULL;
			_tmp32_ = element;
			if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp32_, GXML_TYPE_MAPPEABLE_ELEMENT_PAIR_KEY)) {
				result = FALSE;
				_g_free0 (skey);
				_g_free0 (pkey);
				return result;
			}
			_tmp33_ = element;
			_tmp34_ = gxml_mappeable_element_pair_key_get_map_primary_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, GXML_TYPE_MAPPEABLE_ELEMENT_PAIR_KEY, GXmlMappeableElementPairKey));
			_g_free0 (pkey);
			pkey = _tmp34_;
			_tmp35_ = element;
			_tmp36_ = gxml_mappeable_element_pair_key_get_map_secondary_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, GXML_TYPE_MAPPEABLE_ELEMENT_PAIR_KEY, GXmlMappeableElementPairKey));
			_g_free0 (skey);
			skey = _tmp36_;
		}
	}
	_tmp38_ = pkey;
	if (_tmp38_ == NULL) {
		_tmp37_ = TRUE;
	} else {
		const gchar* _tmp39_ = NULL;
		_tmp39_ = skey;
		_tmp37_ = _tmp39_ == NULL;
	}
	if (_tmp37_) {
		result = FALSE;
		_g_free0 (skey);
		_g_free0 (pkey);
		return result;
	}
	_tmp40_ = self->_hashtable;
	_tmp41_ = pkey;
	_tmp42_ = g_hash_table_lookup (_tmp40_, _tmp41_);
	_tmp43_ = _g_hash_table_ref0 ((GHashTable*) _tmp42_);
	ht = _tmp43_;
	_tmp44_ = ht;
	if (_tmp44_ == NULL) {
		GHashFunc _tmp45_ = NULL;
		GEqualFunc _tmp46_ = NULL;
		GHashTable* _tmp47_ = NULL;
		_tmp45_ = g_str_hash;
		_tmp46_ = g_str_equal;
		_tmp47_ = g_hash_table_new_full (_tmp45_, _tmp46_, _g_free0_, NULL);
		_g_hash_table_unref0 (ht);
		ht = _tmp47_;
	}
	_tmp48_ = ht;
	_tmp49_ = skey;
	_tmp50_ = g_strdup (_tmp49_);
	_tmp51_ = index;
	g_hash_table_insert (_tmp48_, _tmp50_, (gpointer) ((gintptr) _tmp51_));
	_tmp52_ = self->_hashtable;
	_tmp53_ = pkey;
	_tmp54_ = g_hash_table_contains (_tmp52_, _tmp53_);
	if (!_tmp54_) {
		GHashTable* _tmp55_ = NULL;
		const gchar* _tmp56_ = NULL;
		gchar* _tmp57_ = NULL;
		GHashTable* _tmp58_ = NULL;
		GHashTable* _tmp59_ = NULL;
		_tmp55_ = self->_hashtable;
		_tmp56_ = pkey;
		_tmp57_ = g_strdup (_tmp56_);
		_tmp58_ = ht;
		_tmp59_ = _g_hash_table_ref0 (_tmp58_);
		g_hash_table_insert (_tmp55_, _tmp57_, _tmp59_);
	}
	result = TRUE;
	_g_hash_table_unref0 (ht);
	_g_free0 (skey);
	_g_free0 (pkey);
	return result;
}


GXmlGomHashPairedMap* gxml_gom_hash_paired_map_construct (GType object_type) {
	GXmlGomHashPairedMap * self = NULL;
	self = (GXmlGomHashPairedMap*) gxml_base_collection_construct (object_type);
	return self;
}


GXmlGomHashPairedMap* gxml_gom_hash_paired_map_new (void) {
	return gxml_gom_hash_paired_map_construct (GXML_TYPE_GOM_HASH_PAIRED_MAP);
}


const gchar* gxml_gom_hash_paired_map_get_attribute_primary_key (GXmlGomHashPairedMap* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->_attribute_primary_key;
	result = _tmp0_;
	return result;
}


void gxml_gom_hash_paired_map_set_attribute_primary_key (GXmlGomHashPairedMap* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->_attribute_primary_key);
	self->_attribute_primary_key = _tmp1_;
	g_object_notify ((GObject *) self, "attribute-primary-key");
}


const gchar* gxml_gom_hash_paired_map_get_attribute_secondary_key (GXmlGomHashPairedMap* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->_attribute_secondary_key;
	result = _tmp0_;
	return result;
}


void gxml_gom_hash_paired_map_set_attribute_secondary_key (GXmlGomHashPairedMap* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->_attribute_secondary_key);
	self->_attribute_secondary_key = _tmp1_;
	g_object_notify ((GObject *) self, "attribute-secondary-key");
}


static void gxml_gom_hash_paired_map_class_init (GXmlGomHashPairedMapClass * klass) {
	gxml_gom_hash_paired_map_parent_class = g_type_class_peek_parent (klass);
	((GXmlBaseCollectionClass *) klass)->validate_append = (gboolean (*)(GXmlBaseCollection*, gint, GXmlDomElement*, GError**)) gxml_gom_hash_paired_map_real_validate_append;
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_gom_hash_paired_map_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gxml_gom_hash_paired_map_set_property;
	G_OBJECT_CLASS (klass)->finalize = gxml_gom_hash_paired_map_finalize;
	/**
	   * An attribute's name in items to be added and used to retrieve elements
	   * as primary key.
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GOM_HASH_PAIRED_MAP_ATTRIBUTE_PRIMARY_KEY, g_param_spec_string ("attribute-primary-key", "attribute-primary-key", "attribute-primary-key", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	/**
	   * An attribute's name in items to be added and used to retrieve elements
	   * as secondary key.
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GOM_HASH_PAIRED_MAP_ATTRIBUTE_SECONDARY_KEY, g_param_spec_string ("attribute-secondary-key", "attribute-secondary-key", "attribute-secondary-key", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
}


static void gxml_gom_hash_paired_map_gxml_gom_collection_interface_init (GXmlGomCollectionIface * iface) {
	gxml_gom_hash_paired_map_gxml_gom_collection_parent_iface = g_type_interface_peek_parent (iface);
	iface->validate_append = (gboolean (*)(GXmlGomCollection*, gint, GXmlDomElement*, GError**)) gxml_gom_hash_paired_map_real_validate_append;
	iface->search = (void (*)(GXmlGomCollection*, GError**)) gxml_base_collection_search;
	iface->append = (void (*)(GXmlGomCollection*, GXmlDomElement*, GError**)) gxml_base_collection_append;
	iface->initialize = (void (*)(GXmlGomCollection*, GType, GError**)) gxml_base_collection_initialize;
	iface->get_nodes_index = (GQueue* (*) (GXmlGomCollection *)) gxml_base_collection_get_nodes_index;
	iface->get_element = (GXmlGomElement* (*) (GXmlGomCollection *)) gxml_base_collection_get_element;
	iface->set_element = (void (*) (GXmlGomCollection *, GXmlGomElement*)) gxml_base_collection_set_element;
	iface->get_items_name = (const gchar* (*) (GXmlGomCollection *)) gxml_base_collection_get_items_name;
	iface->get_items_type = (GType (*) (GXmlGomCollection *)) gxml_base_collection_get_items_type;
	iface->set_items_type = (void (*) (GXmlGomCollection *, GType)) gxml_base_collection_set_items_type;
}


static void gxml_gom_hash_paired_map_instance_init (GXmlGomHashPairedMap * self) {
	GHashFunc _tmp0_ = NULL;
	GEqualFunc _tmp1_ = NULL;
	GHashTable* _tmp2_ = NULL;
	_tmp0_ = g_str_hash;
	_tmp1_ = g_str_equal;
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, _g_hash_table_unref0_);
	self->_hashtable = _tmp2_;
}


static void gxml_gom_hash_paired_map_finalize (GObject* obj) {
	GXmlGomHashPairedMap * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_GOM_HASH_PAIRED_MAP, GXmlGomHashPairedMap);
	_g_hash_table_unref0 (self->_hashtable);
	_g_free0 (self->_attribute_primary_key);
	_g_free0 (self->_attribute_secondary_key);
	G_OBJECT_CLASS (gxml_gom_hash_paired_map_parent_class)->finalize (obj);
}


/**
 * A class impementing {@link GomCollection} to store references to
 * child {@link DomElement} of {@link GomCollection.element}, using two attributes in
 * items as primary and secondary keys or {@link MappeableElementPairKey.get_map_primary_key}
 * and {@link MappeableElementPairKey.get_map_secondary_key} methods if
 * {@link MappeableElementPairKey} is implemented
 * by items to be added. If one or both keys are not defined in node,
 * it is not added; but keeps it as a child node of actual
 * {@link GomCollection.element}.
 *
 * If {@link GomElement} to be added is of type {@link GomCollection.items_type}
 * and implements {@link MappeableElementPairKey}, you should set
 * {@link attribute_primary_key} and {@link attribute_secondary_key}
 * to null in order to use returned value of {@link MappeableElementPairKey.get_map_primary_key}
 * and {@link MappeableElementPairKey.get_map_secondary_key}
 * as keys.
 *
 * {{{
 *   public class YourObject : GomElement {
 *    [Description (nick="::Name")]
 *    public string name { get; set; }
 *    public string code { get; set; }
 *   }
 *   public class YourList : GomHashPairedMap {
 *    construct {
 *      try { initialize_with_key (typeof (YourObject),"Name"); }
 *      catch (GLib.Error e) {
 *        warning ("Initialization error for collection type: %s : %s"
 *             .printf (get_type ().name(), e.message));
 *      }
 *    }
 *   }
 * }}}
 */
GType gxml_gom_hash_paired_map_get_type (void) {
	static volatile gsize gxml_gom_hash_paired_map_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_gom_hash_paired_map_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlGomHashPairedMapClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_gom_hash_paired_map_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlGomHashPairedMap), 0, (GInstanceInitFunc) gxml_gom_hash_paired_map_instance_init, NULL };
		static const GInterfaceInfo gxml_gom_collection_info = { (GInterfaceInitFunc) gxml_gom_hash_paired_map_gxml_gom_collection_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType gxml_gom_hash_paired_map_type_id;
		gxml_gom_hash_paired_map_type_id = g_type_register_static (GXML_TYPE_BASE_COLLECTION, "GXmlGomHashPairedMap", &g_define_type_info, 0);
		g_type_add_interface_static (gxml_gom_hash_paired_map_type_id, GXML_TYPE_GOM_COLLECTION, &gxml_gom_collection_info);
		g_once_init_leave (&gxml_gom_hash_paired_map_type_id__volatile, gxml_gom_hash_paired_map_type_id);
	}
	return gxml_gom_hash_paired_map_type_id__volatile;
}


static void _vala_gxml_gom_hash_paired_map_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GXmlGomHashPairedMap * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_GOM_HASH_PAIRED_MAP, GXmlGomHashPairedMap);
	switch (property_id) {
		case GXML_GOM_HASH_PAIRED_MAP_ATTRIBUTE_PRIMARY_KEY:
		g_value_set_string (value, gxml_gom_hash_paired_map_get_attribute_primary_key (self));
		break;
		case GXML_GOM_HASH_PAIRED_MAP_ATTRIBUTE_SECONDARY_KEY:
		g_value_set_string (value, gxml_gom_hash_paired_map_get_attribute_secondary_key (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_gxml_gom_hash_paired_map_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GXmlGomHashPairedMap * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_GOM_HASH_PAIRED_MAP, GXmlGomHashPairedMap);
	switch (property_id) {
		case GXML_GOM_HASH_PAIRED_MAP_ATTRIBUTE_PRIMARY_KEY:
		gxml_gom_hash_paired_map_set_attribute_primary_key (self, g_value_get_string (value));
		break;
		case GXML_GOM_HASH_PAIRED_MAP_ATTRIBUTE_SECONDARY_KEY:
		gxml_gom_hash_paired_map_set_attribute_secondary_key (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



