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

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


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

typedef struct _GXmlParser GXmlParser;
typedef struct _GXmlParserIface GXmlParserIface;

#define GXML_TYPE_DOM_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_CHILD_NODE (gxml_dom_child_node_get_type ())
#define GXML_DOM_CHILD_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_CHILD_NODE, GXmlDomChildNode))
#define GXML_IS_DOM_CHILD_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_CHILD_NODE))
#define GXML_DOM_CHILD_NODE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_CHILD_NODE, GXmlDomChildNodeIface))

typedef struct _GXmlDomChildNode GXmlDomChildNode;
typedef struct _GXmlDomChildNodeIface GXmlDomChildNodeIface;

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

typedef struct _GXmlDomNonDocumentTypeChildNode GXmlDomNonDocumentTypeChildNode;
typedef struct _GXmlDomNonDocumentTypeChildNodeIface GXmlDomNonDocumentTypeChildNodeIface;

#define GXML_TYPE_DOM_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_HTML_COLLECTION (gxml_dom_html_collection_get_type ())
#define GXML_DOM_HTML_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_HTML_COLLECTION, GXmlDomHTMLCollection))
#define GXML_IS_DOM_HTML_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_HTML_COLLECTION))
#define GXML_DOM_HTML_COLLECTION_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_HTML_COLLECTION, GXmlDomHTMLCollectionIface))

typedef struct _GXmlDomHTMLCollection GXmlDomHTMLCollection;
typedef struct _GXmlDomHTMLCollectionIface GXmlDomHTMLCollectionIface;

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

typedef struct _GXmlDomTokenList GXmlDomTokenList;
typedef struct _GXmlDomTokenListIface GXmlDomTokenListIface;

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

typedef struct _GXmlDomNamedNodeMap GXmlDomNamedNodeMap;
typedef struct _GXmlDomNamedNodeMapIface GXmlDomNamedNodeMapIface;

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

typedef struct _GXmlDomNodeList GXmlDomNodeList;
typedef struct _GXmlDomNodeListIface GXmlDomNodeListIface;

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

typedef struct _GXmlDomElementList GXmlDomElementList;
typedef struct _GXmlDomElementListClass GXmlDomElementListClass;

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

typedef struct _GXmlDomNonElementParentNode GXmlDomNonElementParentNode;
typedef struct _GXmlDomNonElementParentNodeIface GXmlDomNonElementParentNodeIface;

#define GXML_TYPE_DOM_DOCUMENT (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_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_XPARSER (gxml_xparser_get_type ())
#define GXML_XPARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_XPARSER, GXmlXParser))
#define GXML_XPARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_XPARSER, GXmlXParserClass))
#define GXML_IS_XPARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_XPARSER))
#define GXML_IS_XPARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_XPARSER))
#define GXML_XPARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_XPARSER, GXmlXParserClass))

typedef struct _GXmlXParser GXmlXParser;
typedef struct _GXmlXParserClass GXmlXParserClass;
typedef struct _GXmlXParserPrivate GXmlXParserPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _xmlFreeTextReader0(var) ((var == NULL) ? NULL : (var = (xmlFreeTextReader (var), NULL)))
#define _xmlFreeTextWriter0(var) ((var == NULL) ? NULL : (var = (xmlFreeTextWriter (var), NULL)))
#define _xmlBufferFree0(var) ((var == NULL) ? NULL : (var = (xmlBufferFree (var), NULL)))
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), 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_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_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_param_spec_unref0(var) ((var == NULL) ? NULL : (var = (g_param_spec_unref (var), NULL)))
#define __g_list_free__g_param_spec_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_param_spec_unref0_ (var), NULL)))
#define _xmlFreeDoc0(var) ((var == NULL) ? NULL : (var = (xmlFreeDoc (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define GXML_TYPE_GOM_PROPERTY (gxml_gom_property_get_type ())
#define GXML_GOM_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GOM_PROPERTY, GXmlGomProperty))
#define GXML_IS_GOM_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GOM_PROPERTY))
#define GXML_GOM_PROPERTY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_GOM_PROPERTY, GXmlGomPropertyIface))

typedef struct _GXmlGomProperty GXmlGomProperty;
typedef struct _GXmlGomPropertyIface GXmlGomPropertyIface;

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 _GXmlDomChildNodeIface {
	GTypeInterface parent_iface;
	void (*remove) (GXmlDomChildNode* self);
};

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

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

struct _GXmlDomTokenListIface {
	GTypeInterface parent_iface;
	gchar* (*item) (GXmlDomTokenList* self, gint index);
	gboolean (*contains) (GXmlDomTokenList* self, const gchar* token, GError** error);
	void (*add) (GXmlDomTokenList* self, gchar** tokens, 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 _GXmlDomNodeListIface {
	GTypeInterface parent_iface;
	GXmlDomNode* (*item) (GXmlDomNodeList* self, gint index);
	gint (*get_length) (GXmlDomNodeList* self);
};

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

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

struct _GXmlDomDocumentFragmentIface {
	GTypeInterface parent_iface;
};

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

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

struct _GXmlDomCommentIface {
	GTypeInterface parent_iface;
};

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

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 _GXmlParserIface {
	GTypeInterface parent_iface;
	void (*write_file) (GXmlParser* self, GFile* file, GCancellable* cancellable, GError** error);
	gchar* (*write_string) (GXmlParser* self, GError** error);
	void (*write_stream) (GXmlParser* self, GOutputStream* stream, GCancellable* cancellable, GError** error);
	void (*read_file) (GXmlParser* self, GFile* file, GCancellable* cancellable, GError** error);
	void (*read_stream) (GXmlParser* self, GInputStream* stream, GCancellable* cancellable, GError** error);
	void (*read_string) (GXmlParser* self, const gchar* str, GCancellable* cancellable, GError** error);
	gboolean (*get_backup) (GXmlParser* self);
	void (*set_backup) (GXmlParser* self, gboolean value);
	gboolean (*get_indent) (GXmlParser* self);
	void (*set_indent) (GXmlParser* self, gboolean value);
	GXmlDomNode* (*get_node) (GXmlParser* self);
};

struct _GXmlXParser {
	GObject parent_instance;
	GXmlXParserPrivate * priv;
};

struct _GXmlXParserClass {
	GObjectClass parent_class;
};

struct _GXmlXParserPrivate {
	GXmlDomDocument* _document;
	GXmlDomNode* _node;
	xmlTextReader* tr;
	xmlTextWriter* tw;
	gboolean _backup;
	gboolean _indent;
};

typedef enum  {
	GXML_PARSER_ERROR_INVALID_DATA_ERROR,
	GXML_PARSER_ERROR_INVALID_FILE_ERROR,
	GXML_PARSER_ERROR_INVALID_STREAM_ERROR
} GXmlParserError;
#define GXML_PARSER_ERROR gxml_parser_error_quark ()
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 _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 _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);
};

struct _GXmlGomPropertyIface {
	GTypeInterface parent_iface;
	gboolean (*validate_value) (GXmlGomProperty* self, const gchar* val);
	gchar* (*get_value) (GXmlGomProperty* self);
	void (*set_value) (GXmlGomProperty* self, const gchar* value);
};


static gpointer gxml_xparser_parent_class = NULL;
static GXmlParserIface* gxml_xparser_gxml_parser_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_child_node_get_type (void) G_GNUC_CONST;
GType gxml_dom_non_document_type_child_node_get_type (void) G_GNUC_CONST;
GType gxml_dom_html_collection_get_type (void) G_GNUC_CONST;
GType gxml_dom_token_list_get_type (void) G_GNUC_CONST;
GType gxml_dom_named_node_map_get_type (void) G_GNUC_CONST;
GType gxml_dom_element_get_type (void) G_GNUC_CONST;
GType gxml_dom_node_list_get_type (void) G_GNUC_CONST;
GType gxml_dom_element_list_get_type (void) G_GNUC_CONST;
GType gxml_dom_parent_node_get_type (void) G_GNUC_CONST;
GType gxml_dom_non_element_parent_node_get_type (void) G_GNUC_CONST;
GType gxml_dom_document_fragment_get_type (void) G_GNUC_CONST;
GType gxml_dom_character_data_get_type (void) G_GNUC_CONST;
GType gxml_dom_text_get_type (void) G_GNUC_CONST;
GType gxml_dom_comment_get_type (void) G_GNUC_CONST;
GType gxml_dom_processing_instruction_get_type (void) G_GNUC_CONST;
GType gxml_dom_range_boundary_points_get_type (void) G_GNUC_CONST;
GType gxml_dom_range_get_type (void) G_GNUC_CONST;
GType gxml_dom_node_filter_get_type (void) G_GNUC_CONST;
GType gxml_dom_node_iterator_get_type (void) G_GNUC_CONST;
GType gxml_dom_tree_walker_get_type (void) G_GNUC_CONST;
GType gxml_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_parser_get_type (void) G_GNUC_CONST;
GType gxml_xparser_get_type (void) G_GNUC_CONST;
#define GXML_XPARSER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GXML_TYPE_XPARSER, GXmlXParserPrivate))
enum  {
	GXML_XPARSER_DUMMY_PROPERTY,
	GXML_XPARSER_BACKUP,
	GXML_XPARSER_INDENT,
	GXML_XPARSER_NODE
};
GXmlXParser* gxml_xparser_new (GXmlDomNode* node);
GXmlXParser* gxml_xparser_construct (GType object_type, GXmlDomNode* node);
GXmlDomDocument* gxml_dom_node_get_owner_document (GXmlDomNode* self);
static void gxml_xparser_real_write_stream (GXmlParser* base, GOutputStream* stream, GCancellable* cancellable, GError** error);
gboolean gxml_parser_get_indent (GXmlParser* self);
GXmlDomElement* gxml_dom_document_get_document_element (GXmlDomDocument* self);
static void gxml_xparser_start_node (GXmlXParser* self, GXmlDomNode* node, GError** error);
static guint8* _vala_array_dup11 (guint8* self, int length);
static gchar* gxml_xparser_real_write_string (GXmlParser* base, GError** error);
static gchar* gxml_xparser_dump (GXmlXParser* self, GError** error);
static void gxml_xparser_real_read_string (GXmlParser* base, const gchar* str, GCancellable* cancellable, GError** error);
GQuark gxml_parser_error_quark (void);
static guint8* _vala_array_dup12 (guint8* self, int length);
void gxml_parser_read_stream (GXmlParser* self, GInputStream* stream, GCancellable* cancellable, GError** error);
static void gxml_xparser_real_read_stream (GXmlParser* base, GInputStream* istream, GCancellable* cancellable, GError** error);
void gxml_xparser_read_node (GXmlXParser* self, GXmlDomNode* node, GError** error);
gboolean gxml_xparser_move_next_node (GXmlXParser* self, GError** error);
gboolean gxml_xparser_current_is_element (GXmlXParser* self);
gchar* gxml_xparser_current_node_name (GXmlXParser* self);
gchar* gxml_dom_element_get_local_name (GXmlDomElement* self);
gboolean gxml_xparser_current_is_document (GXmlXParser* self);
gboolean gxml_xparser_read_child_node (GXmlXParser* self, GXmlDomNode* parent, GError** error);
void gxml_xparser_read_element (GXmlXParser* self, GXmlDomElement* element, GError** error);
gboolean gxml_xparser_read_child_element (GXmlXParser* self, GXmlDomNode* parent, GError** error);
void gxml_xparser_read_child_nodes (GXmlXParser* self, GXmlDomNode* parent, GError** error);
gboolean gxml_xparser_current_is_empty_element (GXmlXParser* self);
GXmlDomElement* gxml_xparser_create_element (GXmlXParser* self, GXmlDomNode* parent, GError** error);
GXmlDomElement* gxml_dom_document_create_element_ns (GXmlDomDocument* self, const gchar* namespace, const gchar* qualified_name, GError** error);
GXmlDomElement* gxml_dom_document_create_element (GXmlDomDocument* self, const gchar* local_name, GError** error);
GXmlDomNode* gxml_dom_node_append_child (GXmlDomNode* self, GXmlDomNode* node, GError** error);
GQuark gxml_dom_error_quark (void);
void gxml_dom_element_set_attribute_ns (GXmlDomElement* self, const gchar* namespace, const gchar* name, const gchar* value, GError** error);
GXmlDomNode* gxml_parser_get_node (GXmlParser* self);
GType gxml_gom_object_get_type (void) G_GNUC_CONST;
gboolean gxml_gom_object_set_attribute (GXmlGomObject* self, const gchar* name, const gchar* val);
void gxml_dom_element_set_attribute (GXmlDomElement* self, const gchar* name, const gchar* value, GError** error);
GXmlDomText* gxml_dom_document_create_text_node (GXmlDomDocument* self, const gchar* data, GError** error);
GXmlDomProcessingInstruction* gxml_dom_document_create_processing_instruction (GXmlDomDocument* self, const gchar* target, const gchar* data, GError** error);
GXmlDomComment* gxml_dom_document_create_comment (GXmlDomDocument* self, const gchar* data, GError** error);
gboolean gxml_xparser_read_element_property (GXmlXParser* self, GXmlDomNode* parent, GXmlDomNode** element, GError** error);
gboolean gxml_xparser_add_element_collection (GXmlXParser* self, GXmlDomNode* parent, GXmlDomNode** element, GError** error);
GList* gxml_gom_object_get_property_element_list (GXmlGomObject* self);
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;
static void _g_param_spec_unref0_ (gpointer var);
static void _g_list_free__g_param_spec_unref0_ (GList* self);
GType gxml_gom_collection_get_items_type (GXmlGomCollection* self);
const gchar* gxml_gom_collection_get_items_name (GXmlGomCollection* self);
GXmlGomElement* gxml_gom_collection_get_element (GXmlGomCollection* self);
void gxml_gom_collection_append (GXmlGomCollection* self, GXmlDomElement* node, GError** error);
gchar* gxml_dom_element_get_namespace_uri (GXmlDomElement* self);
GXmlDomNode* gxml_dom_node_get_parent_node (GXmlDomNode* self);
gchar* gxml_dom_node_lookup_prefix (GXmlDomNode* self, const gchar* nspace);
gchar* gxml_dom_element_get_prefix (GXmlDomElement* self);
gchar* gxml_dom_node_get_node_name (GXmlDomNode* self);
GList* gxml_gom_object_get_properties_list (GXmlGomObject* self);
GType gxml_gom_property_get_type (void) G_GNUC_CONST;
gchar* gxml_gom_property_get_value (GXmlGomProperty* self);
gchar* gxml_gom_object_get_property_string (GXmlGomObject* self, GParamSpec* prop);
GXmlDomNamedNodeMap* gxml_dom_element_get_attributes (GXmlDomElement* self);
GXmlDomNodeList* gxml_dom_node_get_child_nodes (GXmlDomNode* self);
gchar* gxml_dom_node_get_node_value (GXmlDomNode* self);
gchar* gxml_dom_processing_instruction_get_target (GXmlDomProcessingInstruction* self);
gchar* gxml_dom_character_data_get_data (GXmlDomCharacterData* self);
static GObject * gxml_xparser_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
void gxml_parser_set_backup (GXmlParser* self, gboolean value);
void gxml_parser_set_indent (GXmlParser* self, gboolean value);
static void gxml_xparser_finalize (GObject* obj);
gboolean gxml_parser_get_backup (GXmlParser* self);
static void _vala_gxml_xparser_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_gxml_xparser_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


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


GXmlXParser* gxml_xparser_construct (GType object_type, GXmlDomNode* node) {
	GXmlXParser * self = NULL;
	GXmlDomNode* _tmp0_ = NULL;
	GXmlDomNode* _tmp1_ = NULL;
	GXmlDomNode* _tmp2_ = NULL;
	g_return_val_if_fail (node != NULL, NULL);
	self = (GXmlXParser*) g_object_new (object_type, NULL);
	_tmp0_ = node;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_node);
	self->priv->_node = _tmp1_;
	_tmp2_ = self->priv->_node;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, GXML_TYPE_DOM_DOCUMENT)) {
		GXmlDomNode* _tmp3_ = NULL;
		GXmlDomDocument* _tmp4_ = NULL;
		_tmp3_ = self->priv->_node;
		_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, GXML_TYPE_DOM_DOCUMENT) ? ((GXmlDomDocument*) _tmp3_) : NULL);
		_g_object_unref0 (self->priv->_document);
		self->priv->_document = _tmp4_;
	} else {
		GXmlDomNode* _tmp5_ = NULL;
		GXmlDomDocument* _tmp6_ = NULL;
		GXmlDomDocument* _tmp7_ = NULL;
		GXmlDomDocument* _tmp8_ = NULL;
		_tmp5_ = self->priv->_node;
		_tmp6_ = gxml_dom_node_get_owner_document (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = _g_object_ref0 (_tmp7_);
		_g_object_unref0 (self->priv->_document);
		self->priv->_document = _tmp8_;
	}
	return self;
}


GXmlXParser* gxml_xparser_new (GXmlDomNode* node) {
	return gxml_xparser_construct (GXML_TYPE_XPARSER, node);
}


static guint8* g_string_get_data (GString* self, int* result_length1) {
	guint8* result;
	guint8* res = NULL;
	const gchar* _tmp0_ = NULL;
	gint res_length1 = 0;
	gint _res_size_ = 0;
	gssize _tmp1_ = 0L;
	gint _tmp2_ = 0;
	guint8* _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
	guint8* _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->str;
	res = (guint8*) _tmp0_;
	res_length1 = -1;
	_res_size_ = res_length1;
	_tmp1_ = self->len;
	res_length1 = (gint) _tmp1_;
	_tmp2_ = res_length1;
	_tmp3_ = res;
	_tmp3__length1 = res_length1;
	_tmp4_ = _tmp3_;
	_tmp4__length1 = _tmp3__length1;
	if (result_length1) {
		*result_length1 = _tmp4__length1;
	}
	result = _tmp4_;
	return result;
}


static guint8* _vala_array_dup11 (guint8* self, int length) {
	return g_memdup (self, length * sizeof (guint8));
}


static void gxml_xparser_real_write_stream (GXmlParser* base, GOutputStream* stream, GCancellable* cancellable, GError** error) {
	GXmlXParser * self;
	xmlBuffer* buf = NULL;
	xmlBuffer* _tmp0_ = NULL;
	xmlBuffer* _tmp1_ = NULL;
	xmlTextWriter* _tmp2_ = NULL;
	GXmlDomNode* _tmp3_ = NULL;
	xmlTextWriter* _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	GXmlDomNode* _tmp8_ = NULL;
	GXmlDomNode* _tmp15_ = NULL;
	xmlTextWriter* _tmp16_ = NULL;
	xmlTextWriter* _tmp17_ = NULL;
	xmlTextWriter* _tmp18_ = NULL;
	GString* s = NULL;
	GString* _tmp19_ = NULL;
	GString* _tmp20_ = NULL;
	xmlBuffer* _tmp21_ = NULL;
	const gchar* _tmp22_ = NULL;
	GMemoryInputStream* b = NULL;
	GString* _tmp23_ = NULL;
	guint8* _tmp24_ = NULL;
	gint _tmp24__length1 = 0;
	guint8* _tmp25_ = NULL;
	gint _tmp25__length1 = 0;
	guint8* _tmp26_ = NULL;
	gint _tmp26__length1 = 0;
	GMemoryInputStream* _tmp27_ = NULL;
	GOutputStream* _tmp28_ = NULL;
	GMemoryInputStream* _tmp29_ = NULL;
	GOutputStream* _tmp30_ = NULL;
	GError * _inner_error_ = NULL;
	self = (GXmlXParser*) base;
	g_return_if_fail (stream != NULL);
	_tmp0_ = xmlBufferCreate ();
	buf = _tmp0_;
	_tmp1_ = buf;
	_tmp2_ = xmlNewTextWriterMemory (_tmp1_, FALSE);
	_xmlFreeTextWriter0 (self->priv->tw);
	self->priv->tw = _tmp2_;
	_tmp3_ = self->priv->_node;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, GXML_TYPE_DOM_DOCUMENT)) {
		xmlTextWriter* _tmp4_ = NULL;
		_tmp4_ = self->priv->tw;
		xmlTextWriterStartDocument (_tmp4_, NULL, NULL, NULL);
	}
	_tmp5_ = self->priv->tw;
	_tmp6_ = gxml_parser_get_indent ((GXmlParser*) self);
	_tmp7_ = _tmp6_;
	xmlTextWriterSetIndent (_tmp5_, _tmp7_);
	_tmp8_ = self->priv->_node;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, GXML_TYPE_DOM_DOCUMENT)) {
		GXmlDomNode* _tmp9_ = NULL;
		GXmlDomElement* _tmp10_ = NULL;
		GXmlDomElement* _tmp11_ = NULL;
		GXmlDomElement* _tmp12_ = NULL;
		gboolean _tmp13_ = FALSE;
		_tmp9_ = self->priv->_node;
		_tmp10_ = gxml_dom_document_get_document_element (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, GXML_TYPE_DOM_DOCUMENT) ? ((GXmlDomDocument*) _tmp9_) : NULL);
		_tmp11_ = _tmp10_;
		_tmp12_ = _tmp11_;
		_tmp13_ = _tmp12_ == NULL;
		_g_object_unref0 (_tmp12_);
		if (_tmp13_) {
			xmlTextWriter* _tmp14_ = NULL;
			_tmp14_ = self->priv->tw;
			xmlTextWriterEndDocument (_tmp14_);
		}
	}
	_tmp15_ = self->priv->_node;
	gxml_xparser_start_node (self, _tmp15_, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		_xmlBufferFree0 (buf);
		return;
	}
	_tmp16_ = self->priv->tw;
	xmlTextWriterEndElement (_tmp16_);
	_tmp17_ = self->priv->tw;
	xmlTextWriterEndDocument (_tmp17_);
	_tmp18_ = self->priv->tw;
	xmlTextWriterFlush (_tmp18_);
	_tmp19_ = g_string_new ("");
	s = _tmp19_;
	_tmp20_ = s;
	_tmp21_ = buf;
	_tmp22_ = xmlBufferContent (_tmp21_);
	g_string_append (_tmp20_, _tmp22_);
	_tmp23_ = s;
	_tmp24_ = g_string_get_data (_tmp23_, &_tmp24__length1);
	_tmp25_ = _tmp24_;
	_tmp25__length1 = _tmp24__length1;
	_tmp26_ = (_tmp25_ != NULL) ? _vala_array_dup11 (_tmp25_, _tmp25__length1) : ((gpointer) _tmp25_);
	_tmp26__length1 = _tmp25__length1;
	_tmp27_ = (GMemoryInputStream*) g_memory_input_stream_new_from_data (_tmp26_, _tmp26__length1, NULL);
	b = _tmp27_;
	_tmp28_ = stream;
	_tmp29_ = b;
	g_output_stream_splice (_tmp28_, (GInputStream*) _tmp29_, G_OUTPUT_STREAM_SPLICE_NONE, NULL, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		_g_object_unref0 (b);
		_g_string_free0 (s);
		_xmlBufferFree0 (buf);
		return;
	}
	_tmp30_ = stream;
	g_output_stream_close (_tmp30_, NULL, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		_g_object_unref0 (b);
		_g_string_free0 (s);
		_xmlBufferFree0 (buf);
		return;
	}
	_xmlFreeTextWriter0 (self->priv->tw);
	self->priv->tw = NULL;
	_g_object_unref0 (b);
	_g_string_free0 (s);
	_xmlBufferFree0 (buf);
}


static gchar* gxml_xparser_real_write_string (GXmlParser* base, GError** error) {
	GXmlXParser * self;
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	GError * _inner_error_ = NULL;
	self = (GXmlXParser*) base;
	_tmp1_ = gxml_xparser_dump (self, &_inner_error_);
	_tmp0_ = _tmp1_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		return NULL;
	}
	_tmp2_ = _tmp0_;
	_tmp0_ = NULL;
	result = _tmp2_;
	_g_free0 (_tmp0_);
	return result;
}


static guint8* string_get_data (const gchar* self, int* result_length1) {
	guint8* result;
	guint8* res = NULL;
	gint res_length1 = 0;
	gint _res_size_ = 0;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	guint8* _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
	guint8* _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
	g_return_val_if_fail (self != NULL, NULL);
	res = (guint8*) self;
	res_length1 = -1;
	_res_size_ = res_length1;
	_tmp0_ = strlen (self);
	_tmp1_ = _tmp0_;
	res_length1 = (gint) _tmp1_;
	_tmp2_ = res_length1;
	_tmp3_ = res;
	_tmp3__length1 = res_length1;
	_tmp4_ = _tmp3_;
	_tmp4__length1 = _tmp3__length1;
	if (result_length1) {
		*result_length1 = _tmp4__length1;
	}
	result = _tmp4_;
	return result;
}


static guint8* _vala_array_dup12 (guint8* self, int length) {
	return g_memdup (self, length * sizeof (guint8));
}


static void gxml_xparser_real_read_string (GXmlParser* base, const gchar* str, GCancellable* cancellable, GError** error) {
	GXmlXParser * self;
	const gchar* _tmp0_ = NULL;
	GMemoryInputStream* stream = NULL;
	const gchar* _tmp3_ = NULL;
	guint8* _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
	guint8* _tmp5_ = NULL;
	gint _tmp5__length1 = 0;
	guint8* _tmp6_ = NULL;
	gint _tmp6__length1 = 0;
	GDestroyNotify _tmp7_ = NULL;
	GMemoryInputStream* _tmp8_ = NULL;
	GCancellable* _tmp9_ = NULL;
	GError * _inner_error_ = NULL;
	self = (GXmlXParser*) base;
	g_return_if_fail (str != NULL);
	_tmp0_ = str;
	if (g_strcmp0 (_tmp0_, "") == 0) {
		const gchar* _tmp1_ = NULL;
		GError* _tmp2_ = NULL;
		_tmp1_ = _ ("Invalid document string, it is empty or is not allowed");
		_tmp2_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _tmp1_);
		_inner_error_ = _tmp2_;
		g_propagate_error (error, _inner_error_);
		return;
	}
	_tmp3_ = str;
	_tmp4_ = string_get_data (_tmp3_, &_tmp4__length1);
	_tmp5_ = _tmp4_;
	_tmp5__length1 = _tmp4__length1;
	_tmp6_ = (_tmp5_ != NULL) ? _vala_array_dup12 (_tmp5_, _tmp5__length1) : ((gpointer) _tmp5_);
	_tmp6__length1 = _tmp5__length1;
	_tmp7_ = g_free;
	_tmp8_ = (GMemoryInputStream*) g_memory_input_stream_new_from_data (_tmp6_, _tmp6__length1, _tmp7_);
	stream = _tmp8_;
	_tmp9_ = cancellable;
	gxml_parser_read_stream ((GXmlParser*) self, (GInputStream*) stream, _tmp9_, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		_g_object_unref0 (stream);
		return;
	}
	_g_object_unref0 (stream);
}


static void gxml_xparser_real_read_stream (GXmlParser* base, GInputStream* istream, GCancellable* cancellable, GError** error) {
	GXmlXParser * self;
	GMemoryOutputStream* b = NULL;
	GMemoryOutputStream* _tmp0_ = NULL;
	GMemoryOutputStream* _tmp1_ = NULL;
	GInputStream* _tmp2_ = NULL;
	GMemoryOutputStream* _tmp3_ = NULL;
	void* _tmp4_ = NULL;
	void* _tmp5_ = NULL;
	GMemoryOutputStream* _tmp6_ = NULL;
	gsize _tmp7_ = 0UL;
	xmlTextReader* _tmp8_ = NULL;
	GXmlDomNode* _tmp9_ = NULL;
	GError * _inner_error_ = NULL;
	self = (GXmlXParser*) base;
	g_return_if_fail (istream != NULL);
	_tmp0_ = (GMemoryOutputStream*) g_memory_output_stream_new_resizable ();
	b = _tmp0_;
	_tmp1_ = b;
	_tmp2_ = istream;
	g_output_stream_splice ((GOutputStream*) _tmp1_, _tmp2_, 0, NULL, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		_g_object_unref0 (b);
		return;
	}
	_tmp3_ = b;
	_tmp4_ = g_memory_output_stream_get_data (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = b;
	_tmp7_ = g_memory_output_stream_get_data_size (_tmp6_);
	_tmp8_ = xmlReaderForMemory ((gchar*) _tmp5_, (gint) _tmp7_, "/gxml_memory", NULL, 0);
	_xmlFreeTextReader0 (self->priv->tr);
	self->priv->tr = _tmp8_;
	_tmp9_ = self->priv->_node;
	gxml_xparser_read_node (self, _tmp9_, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		_g_object_unref0 (b);
		return;
	}
	_xmlFreeTextReader0 (self->priv->tr);
	self->priv->tr = NULL;
	_g_object_unref0 (b);
}


/**
   * Reads a node using current parser.
   */
void gxml_xparser_read_node (GXmlXParser* self, GXmlDomNode* node, GError** error) {
	xmlTextReader* _tmp0_ = NULL;
	GXmlDomNode* _tmp3_ = NULL;
	gboolean _tmp21_ = FALSE;
	gboolean _tmp22_ = FALSE;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (node != NULL);
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		const gchar* _tmp1_ = NULL;
		GError* _tmp2_ = NULL;
		_tmp1_ = _ ("Internal Error: No TextReader was set");
		_tmp2_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _tmp1_);
		_inner_error_ = _tmp2_;
		g_propagate_error (error, _inner_error_);
		return;
	}
	gxml_xparser_move_next_node (self, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		return;
	}
	_tmp3_ = node;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, GXML_TYPE_DOM_ELEMENT)) {
		GXmlDomNode* _tmp20_ = NULL;
		while (TRUE) {
			gboolean _tmp4_ = FALSE;
			gboolean _tmp5_ = FALSE;
			gboolean _tmp16_ = FALSE;
			gboolean _tmp18_ = FALSE;
			gboolean _tmp19_ = FALSE;
			_tmp5_ = gxml_xparser_current_is_element (self);
			if (_tmp5_) {
				gchar* _tmp6_ = NULL;
				gchar* _tmp7_ = NULL;
				gchar* _tmp8_ = NULL;
				gchar* _tmp9_ = NULL;
				GXmlDomNode* _tmp10_ = NULL;
				gchar* _tmp11_ = NULL;
				gchar* _tmp12_ = NULL;
				gchar* _tmp13_ = NULL;
				gchar* _tmp14_ = NULL;
				gchar* _tmp15_ = NULL;
				_tmp6_ = gxml_xparser_current_node_name (self);
				_tmp7_ = _tmp6_;
				_tmp8_ = g_utf8_strdown (_tmp7_, (gssize) -1);
				_tmp9_ = _tmp8_;
				_tmp10_ = node;
				_tmp11_ = gxml_dom_element_get_local_name (G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp10_) : NULL);
				_tmp12_ = _tmp11_;
				_tmp13_ = _tmp12_;
				_tmp14_ = g_utf8_strdown (_tmp13_, (gssize) -1);
				_tmp15_ = _tmp14_;
				_tmp4_ = g_strcmp0 (_tmp9_, _tmp15_) == 0;
				_g_free0 (_tmp15_);
				_g_free0 (_tmp13_);
				_g_free0 (_tmp9_);
				_g_free0 (_tmp7_);
			} else {
				_tmp4_ = FALSE;
			}
			if (_tmp4_) {
				break;
			}
			_tmp16_ = gxml_xparser_current_is_document (self);
			if (!_tmp16_) {
				GXmlDomDocument* _tmp17_ = NULL;
				_tmp17_ = self->priv->_document;
				gxml_xparser_read_child_node (self, (GXmlDomNode*) _tmp17_, &_inner_error_);
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					g_propagate_error (error, _inner_error_);
					return;
				}
			}
			_tmp19_ = gxml_xparser_move_next_node (self, &_inner_error_);
			_tmp18_ = _tmp19_;
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				g_propagate_error (error, _inner_error_);
				return;
			}
			if (!_tmp18_) {
				break;
			}
		}
		_tmp20_ = node;
		gxml_xparser_read_element (self, G_TYPE_CHECK_INSTANCE_TYPE (_tmp20_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp20_) : NULL, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			g_propagate_error (error, _inner_error_);
			return;
		}
	}
	_tmp22_ = gxml_xparser_current_is_element (self);
	if (_tmp22_) {
		GXmlDomNode* _tmp23_ = NULL;
		_tmp23_ = node;
		_tmp21_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp23_, GXML_TYPE_DOM_DOCUMENT);
	} else {
		_tmp21_ = FALSE;
	}
	if (_tmp21_) {
		GXmlDomNode* _tmp24_ = NULL;
		_tmp24_ = node;
		gxml_xparser_read_child_element (self, _tmp24_, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			g_propagate_error (error, _inner_error_);
			return;
		}
	} else {
		GXmlDomNode* _tmp25_ = NULL;
		_tmp25_ = node;
		gxml_xparser_read_child_nodes (self, _tmp25_, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			g_propagate_error (error, _inner_error_);
			return;
		}
	}
}


/**
   * Use parser to go to next parsed node.
   */
gboolean gxml_xparser_move_next_node (GXmlXParser* self, GError** error) {
	gboolean result = FALSE;
	xmlTextReader* _tmp0_ = NULL;
	gint res = 0;
	xmlTextReader* _tmp4_ = NULL;
	gint _tmp5_ = 0;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		const gchar* _tmp1_ = NULL;
		GError* _tmp2_ = NULL;
		gboolean _tmp3_ = FALSE;
		_tmp1_ = _ ("Internal Error: No TextReader was set");
		_tmp2_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _tmp1_);
		_inner_error_ = _tmp2_;
		g_propagate_error (error, _inner_error_);
		return _tmp3_;
	}
	_tmp4_ = self->priv->tr;
	_tmp5_ = xmlTextReaderRead (_tmp4_);
	res = _tmp5_;
	if (res == -1) {
		const gchar* _tmp6_ = NULL;
		GError* _tmp7_ = NULL;
		gboolean _tmp8_ = FALSE;
		_tmp6_ = _ ("Can't read node data");
		_tmp7_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _tmp6_);
		_inner_error_ = _tmp7_;
		g_propagate_error (error, _inner_error_);
		return _tmp8_;
	}
	if (res == 0) {
		result = FALSE;
		return result;
	}
	result = TRUE;
	return result;
}


/**
   * Check if current node has childs.
   */
gboolean gxml_xparser_current_is_empty_element (GXmlXParser* self) {
	gboolean result = FALSE;
	xmlTextReader* _tmp0_ = NULL;
	xmlTextReader* _tmp4_ = NULL;
	gint _tmp5_ = 0;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		const gchar* _tmp1_ = NULL;
		GError* _tmp2_ = NULL;
		gboolean _tmp3_ = FALSE;
		_tmp1_ = _ ("Internal Error: No TextReader was set");
		_tmp2_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _tmp1_);
		_inner_error_ = _tmp2_;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return _tmp3_;
	}
	_tmp4_ = self->priv->tr;
	_tmp5_ = xmlTextReaderIsEmptyElement (_tmp4_);
	result = _tmp5_ == 1;
	return result;
}


/**
   * Check if current node found by parser, is a {@link DomElement}
   */
gboolean gxml_xparser_current_is_element (GXmlXParser* self) {
	gboolean result = FALSE;
	xmlTextReader* _tmp0_ = NULL;
	xmlTextReader* _tmp4_ = NULL;
	gint _tmp5_ = 0;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		const gchar* _tmp1_ = NULL;
		GError* _tmp2_ = NULL;
		gboolean _tmp3_ = FALSE;
		_tmp1_ = _ ("Internal Error: No TextReader was set");
		_tmp2_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _tmp1_);
		_inner_error_ = _tmp2_;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return _tmp3_;
	}
	_tmp4_ = self->priv->tr;
	_tmp5_ = xmlTextReaderNodeType (_tmp4_);
	result = _tmp5_ == ((gint) XML_READER_TYPE_ELEMENT);
	return result;
}


/**
   * Check if current node found by parser, is a {@link DomDocument}
   */
gboolean gxml_xparser_current_is_document (GXmlXParser* self) {
	gboolean result = FALSE;
	xmlTextReader* _tmp0_ = NULL;
	xmlTextReader* _tmp4_ = NULL;
	gint _tmp5_ = 0;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		const gchar* _tmp1_ = NULL;
		GError* _tmp2_ = NULL;
		gboolean _tmp3_ = FALSE;
		_tmp1_ = _ ("Internal Error: No TextReader was set");
		_tmp2_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _tmp1_);
		_inner_error_ = _tmp2_;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return _tmp3_;
	}
	_tmp4_ = self->priv->tr;
	_tmp5_ = xmlTextReaderNodeType (_tmp4_);
	result = _tmp5_ == ((gint) XML_READER_TYPE_DOCUMENT);
	return result;
}


/**
   * Returns current node's local name, found by parser.
   */
gchar* gxml_xparser_current_node_name (GXmlXParser* self) {
	gchar* result = NULL;
	xmlTextReader* _tmp0_ = NULL;
	xmlTextReader* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		const gchar* _tmp1_ = NULL;
		GError* _tmp2_ = NULL;
		_tmp1_ = _ ("Internal Error: No TextReader was set");
		_tmp2_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _tmp1_);
		_inner_error_ = _tmp2_;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return NULL;
	}
	_tmp3_ = self->priv->tr;
	_tmp4_ = (const gchar*) xmlTextReaderConstLocalName (_tmp3_);
	_tmp5_ = g_strdup (_tmp4_);
	result = _tmp5_;
	return result;
}


/**
   * Creates a new {@link DomElement} and append it as a child of parent.
   */
GXmlDomElement* gxml_xparser_create_element (GXmlXParser* self, GXmlDomNode* parent, GError** error) {
	GXmlDomElement* result = NULL;
	xmlTextReader* _tmp0_ = NULL;
	GXmlDomElement* n = NULL;
	gchar* prefix = NULL;
	xmlTextReader* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	GXmlDomNode* _tmp30_ = NULL;
	GXmlDomElement* _tmp31_ = NULL;
	GXmlDomNode* _tmp32_ = NULL;
	GXmlDomNode* _tmp33_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (parent != NULL, NULL);
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		const gchar* _tmp1_ = NULL;
		GError* _tmp2_ = NULL;
		_tmp1_ = _ ("Internal Error: No TextReader was set");
		_tmp2_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _tmp1_);
		_inner_error_ = _tmp2_;
		g_propagate_error (error, _inner_error_);
		return NULL;
	}
	n = NULL;
	_tmp3_ = self->priv->tr;
	_tmp4_ = (gchar*) xmlTextReaderPrefix (_tmp3_);
	prefix = _tmp4_;
	_tmp5_ = prefix;
	if (_tmp5_ != NULL) {
		gchar* nsuri = NULL;
		xmlTextReader* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		GXmlDomElement* _tmp9_ = NULL;
		GXmlDomDocument* _tmp10_ = NULL;
		const gchar* _tmp11_ = NULL;
		xmlTextReader* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
		gchar* _tmp14_ = NULL;
		gchar* _tmp15_ = NULL;
		gchar* _tmp16_ = NULL;
		xmlTextReader* _tmp17_ = NULL;
		const gchar* _tmp18_ = NULL;
		gchar* _tmp19_ = NULL;
		gchar* _tmp20_ = NULL;
		GXmlDomElement* _tmp21_ = NULL;
		GXmlDomElement* _tmp22_ = NULL;
		GXmlDomElement* _tmp23_ = NULL;
		_tmp6_ = self->priv->tr;
		_tmp7_ = prefix;
		_tmp8_ = (gchar*) xmlTextReaderLookupNamespace (_tmp6_, (xmlChar*) _tmp7_);
		nsuri = _tmp8_;
		_tmp10_ = self->priv->_document;
		_tmp11_ = nsuri;
		_tmp12_ = self->priv->tr;
		_tmp13_ = (gchar*) xmlTextReaderPrefix (_tmp12_);
		_tmp14_ = _tmp13_;
		_tmp15_ = g_strconcat (_tmp14_, ":", NULL);
		_tmp16_ = _tmp15_;
		_tmp17_ = self->priv->tr;
		_tmp18_ = (const gchar*) xmlTextReaderConstLocalName (_tmp17_);
		_tmp19_ = g_strconcat (_tmp16_, _tmp18_, NULL);
		_tmp20_ = _tmp19_;
		_tmp21_ = gxml_dom_document_create_element_ns (_tmp10_, _tmp11_, _tmp20_, &_inner_error_);
		_tmp22_ = _tmp21_;
		_g_free0 (_tmp20_);
		_g_free0 (_tmp16_);
		_g_free0 (_tmp14_);
		_tmp9_ = _tmp22_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			g_propagate_error (error, _inner_error_);
			_g_free0 (nsuri);
			_g_free0 (prefix);
			_g_object_unref0 (n);
			return NULL;
		}
		_tmp23_ = _tmp9_;
		_tmp9_ = NULL;
		_g_object_unref0 (n);
		n = _tmp23_;
		_g_object_unref0 (_tmp9_);
		_g_free0 (nsuri);
	} else {
		GXmlDomElement* _tmp24_ = NULL;
		GXmlDomDocument* _tmp25_ = NULL;
		xmlTextReader* _tmp26_ = NULL;
		const gchar* _tmp27_ = NULL;
		GXmlDomElement* _tmp28_ = NULL;
		GXmlDomElement* _tmp29_ = NULL;
		_tmp25_ = self->priv->_document;
		_tmp26_ = self->priv->tr;
		_tmp27_ = (const gchar*) xmlTextReaderConstLocalName (_tmp26_);
		_tmp28_ = gxml_dom_document_create_element (_tmp25_, _tmp27_, &_inner_error_);
		_tmp24_ = _tmp28_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			g_propagate_error (error, _inner_error_);
			_g_free0 (prefix);
			_g_object_unref0 (n);
			return NULL;
		}
		_tmp29_ = _tmp24_;
		_tmp24_ = NULL;
		_g_object_unref0 (n);
		n = _tmp29_;
		_g_object_unref0 (_tmp24_);
	}
	_tmp30_ = parent;
	_tmp31_ = n;
	_tmp32_ = gxml_dom_node_append_child (_tmp30_, (GXmlDomNode*) _tmp31_, &_inner_error_);
	_tmp33_ = _tmp32_;
	_g_object_unref0 (_tmp33_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		_g_free0 (prefix);
		_g_object_unref0 (n);
		return NULL;
	}
	result = n;
	_g_free0 (prefix);
	return result;
}


/**
   * Reads a {@link DomElement}
   */
void gxml_xparser_read_element (GXmlXParser* self, GXmlDomElement* element, GError** error) {
	xmlTextReader* _tmp0_ = NULL;
	gint nattr = 0;
	xmlTextReader* _tmp3_ = NULL;
	gint _tmp4_ = 0;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (element != NULL);
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		const gchar* _tmp1_ = NULL;
		GError* _tmp2_ = NULL;
		_tmp1_ = _ ("Internal Error: No TextReader was set");
		_tmp2_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _tmp1_);
		_inner_error_ = _tmp2_;
		g_propagate_error (error, _inner_error_);
		return;
	}
	_tmp3_ = self->priv->tr;
	_tmp4_ = xmlTextReaderAttributeCount (_tmp3_);
	nattr = _tmp4_;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp5_ = FALSE;
			_tmp5_ = TRUE;
			while (TRUE) {
				gint _tmp7_ = 0;
				gint _tmp8_ = 0;
				gint c = 0;
				xmlTextReader* _tmp9_ = NULL;
				gint _tmp10_ = 0;
				gint _tmp11_ = 0;
				gint _tmp12_ = 0;
				xmlTextReader* _tmp19_ = NULL;
				gint _tmp20_ = 0;
				if (!_tmp5_) {
					gint _tmp6_ = 0;
					_tmp6_ = i;
					i = _tmp6_ + 1;
				}
				_tmp5_ = FALSE;
				_tmp7_ = i;
				_tmp8_ = nattr;
				if (!(_tmp7_ < _tmp8_)) {
					break;
				}
				_tmp9_ = self->priv->tr;
				_tmp10_ = i;
				_tmp11_ = xmlTextReaderMoveToAttributeNo (_tmp9_, _tmp10_);
				c = _tmp11_;
				_tmp12_ = c;
				if (_tmp12_ != 1) {
					const gchar* _tmp13_ = NULL;
					gint _tmp14_ = 0;
					gchar* _tmp15_ = NULL;
					gchar* _tmp16_ = NULL;
					GError* _tmp17_ = NULL;
					GError* _tmp18_ = NULL;
					_tmp13_ = _ ("Parsing ERROR: Fail to move to attribute number: %i");
					_tmp14_ = i;
					_tmp15_ = g_strdup_printf (_tmp13_, _tmp14_);
					_tmp16_ = _tmp15_;
					_tmp17_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_HIERARCHY_REQUEST_ERROR, _tmp16_);
					_tmp18_ = _tmp17_;
					_g_free0 (_tmp16_);
					_inner_error_ = _tmp18_;
					g_propagate_error (error, _inner_error_);
					return;
				}
				_tmp19_ = self->priv->tr;
				_tmp20_ = xmlTextReaderIsNamespaceDecl (_tmp19_);
				if (_tmp20_ == 1) {
					gchar* nsp = NULL;
					xmlTextReader* _tmp21_ = NULL;
					const gchar* _tmp22_ = NULL;
					gchar* _tmp23_ = NULL;
					gchar* aprefix = NULL;
					xmlTextReader* _tmp24_ = NULL;
					gchar* _tmp25_ = NULL;
					xmlTextReader* _tmp26_ = NULL;
					xmlTextReader* _tmp27_ = NULL;
					gint _tmp28_ = 0;
					_tmp21_ = self->priv->tr;
					_tmp22_ = (const gchar*) xmlTextReaderConstLocalName (_tmp21_);
					_tmp23_ = g_strdup (_tmp22_);
					nsp = _tmp23_;
					_tmp24_ = self->priv->tr;
					_tmp25_ = (gchar*) xmlTextReaderPrefix (_tmp24_);
					aprefix = _tmp25_;
					_tmp26_ = self->priv->tr;
					xmlTextReaderReadAttributeValue (_tmp26_);
					_tmp27_ = self->priv->tr;
					_tmp28_ = xmlTextReaderNodeType (_tmp27_);
					if (_tmp28_ == ((gint) XML_READER_TYPE_TEXT)) {
						gchar* ansuri = NULL;
						xmlTextReader* _tmp29_ = NULL;
						gchar* _tmp30_ = NULL;
						gchar* ansp = NULL;
						const gchar* _tmp31_ = NULL;
						gchar* _tmp32_ = NULL;
						const gchar* _tmp33_ = NULL;
						GXmlDomElement* _tmp39_ = NULL;
						const gchar* _tmp40_ = NULL;
						const gchar* _tmp41_ = NULL;
						_tmp29_ = self->priv->tr;
						_tmp30_ = (gchar*) xmlTextReaderReadString (_tmp29_);
						ansuri = _tmp30_;
						_tmp31_ = nsp;
						_tmp32_ = g_strdup (_tmp31_);
						ansp = _tmp32_;
						_tmp33_ = nsp;
						if (g_strcmp0 (_tmp33_, "xmlns") != 0) {
							const gchar* _tmp34_ = NULL;
							gchar* _tmp35_ = NULL;
							gchar* _tmp36_ = NULL;
							const gchar* _tmp37_ = NULL;
							gchar* _tmp38_ = NULL;
							_tmp34_ = aprefix;
							_tmp35_ = g_strconcat (_tmp34_, ":", NULL);
							_tmp36_ = _tmp35_;
							_tmp37_ = nsp;
							_tmp38_ = g_strconcat (_tmp36_, _tmp37_, NULL);
							_g_free0 (ansp);
							ansp = _tmp38_;
							_g_free0 (_tmp36_);
						}
						_tmp39_ = element;
						_tmp40_ = ansp;
						_tmp41_ = ansuri;
						gxml_dom_element_set_attribute_ns (_tmp39_, "http://www.w3.org/2000/xmlns/", _tmp40_, _tmp41_, &_inner_error_);
						if (G_UNLIKELY (_inner_error_ != NULL)) {
							g_propagate_error (error, _inner_error_);
							_g_free0 (ansp);
							_g_free0 (ansuri);
							_g_free0 (aprefix);
							_g_free0 (nsp);
							return;
						}
						_g_free0 (ansp);
						_g_free0 (ansuri);
					}
					_g_free0 (aprefix);
					_g_free0 (nsp);
				} else {
					gchar* attrname = NULL;
					xmlTextReader* _tmp42_ = NULL;
					const gchar* _tmp43_ = NULL;
					gchar* _tmp44_ = NULL;
					gchar* prefix = NULL;
					xmlTextReader* _tmp45_ = NULL;
					gchar* _tmp46_ = NULL;
					xmlTextReader* _tmp47_ = NULL;
					xmlTextReader* _tmp48_ = NULL;
					gint _tmp49_ = 0;
					_tmp42_ = self->priv->tr;
					_tmp43_ = (const gchar*) xmlTextReaderConstLocalName (_tmp42_);
					_tmp44_ = g_strdup (_tmp43_);
					attrname = _tmp44_;
					_tmp45_ = self->priv->tr;
					_tmp46_ = (gchar*) xmlTextReaderPrefix (_tmp45_);
					prefix = _tmp46_;
					_tmp47_ = self->priv->tr;
					xmlTextReaderReadAttributeValue (_tmp47_);
					_tmp48_ = self->priv->tr;
					_tmp49_ = xmlTextReaderNodeType (_tmp48_);
					if (_tmp49_ == ((gint) XML_READER_TYPE_TEXT)) {
						gchar* attrval = NULL;
						xmlTextReader* _tmp50_ = NULL;
						gchar* _tmp51_ = NULL;
						gboolean processed = FALSE;
						GXmlDomNode* _tmp52_ = NULL;
						GXmlDomNode* _tmp53_ = NULL;
						gboolean _tmp58_ = FALSE;
						_tmp50_ = self->priv->tr;
						_tmp51_ = (gchar*) xmlTextReaderReadString (_tmp50_);
						attrval = _tmp51_;
						processed = FALSE;
						_tmp52_ = gxml_parser_get_node ((GXmlParser*) self);
						_tmp53_ = _tmp52_;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp53_, GXML_TYPE_GOM_OBJECT)) {
							GXmlDomElement* _tmp54_ = NULL;
							const gchar* _tmp55_ = NULL;
							const gchar* _tmp56_ = NULL;
							gboolean _tmp57_ = FALSE;
							_tmp54_ = element;
							_tmp55_ = attrname;
							_tmp56_ = attrval;
							_tmp57_ = gxml_gom_object_set_attribute (G_TYPE_CHECK_INSTANCE_TYPE (_tmp54_, GXML_TYPE_GOM_OBJECT) ? ((GXmlGomObject*) _tmp54_) : NULL, _tmp55_, _tmp56_);
							processed = _tmp57_;
						}
						_tmp58_ = processed;
						if (!_tmp58_) {
							const gchar* _tmp59_ = NULL;
							_tmp59_ = prefix;
							if (_tmp59_ != NULL) {
								gchar* nsuri = NULL;
								const gchar* _tmp60_ = NULL;
								GXmlDomElement* _tmp65_ = NULL;
								const gchar* _tmp66_ = NULL;
								const gchar* _tmp67_ = NULL;
								gchar* _tmp68_ = NULL;
								gchar* _tmp69_ = NULL;
								const gchar* _tmp70_ = NULL;
								gchar* _tmp71_ = NULL;
								gchar* _tmp72_ = NULL;
								const gchar* _tmp73_ = NULL;
								nsuri = NULL;
								_tmp60_ = prefix;
								if (g_strcmp0 (_tmp60_, "xml") == 0) {
									gchar* _tmp61_ = NULL;
									_tmp61_ = g_strdup ("http://www.w3.org/2000/xmlns/");
									_g_free0 (nsuri);
									nsuri = _tmp61_;
								} else {
									xmlTextReader* _tmp62_ = NULL;
									const gchar* _tmp63_ = NULL;
									gchar* _tmp64_ = NULL;
									_tmp62_ = self->priv->tr;
									_tmp63_ = prefix;
									_tmp64_ = (gchar*) xmlTextReaderLookupNamespace (_tmp62_, (xmlChar*) _tmp63_);
									_g_free0 (nsuri);
									nsuri = _tmp64_;
								}
								_tmp65_ = element;
								_tmp66_ = nsuri;
								_tmp67_ = prefix;
								_tmp68_ = g_strconcat (_tmp67_, ":", NULL);
								_tmp69_ = _tmp68_;
								_tmp70_ = attrname;
								_tmp71_ = g_strconcat (_tmp69_, _tmp70_, NULL);
								_tmp72_ = _tmp71_;
								_tmp73_ = attrval;
								gxml_dom_element_set_attribute_ns (_tmp65_, _tmp66_, _tmp72_, _tmp73_, &_inner_error_);
								_g_free0 (_tmp72_);
								_g_free0 (_tmp69_);
								if (G_UNLIKELY (_inner_error_ != NULL)) {
									g_propagate_error (error, _inner_error_);
									_g_free0 (nsuri);
									_g_free0 (attrval);
									_g_free0 (prefix);
									_g_free0 (attrname);
									return;
								}
								_g_free0 (nsuri);
							} else {
								GXmlDomElement* _tmp74_ = NULL;
								const gchar* _tmp75_ = NULL;
								const gchar* _tmp76_ = NULL;
								_tmp74_ = element;
								_tmp75_ = attrname;
								_tmp76_ = attrval;
								gxml_dom_element_set_attribute (_tmp74_, _tmp75_, _tmp76_, &_inner_error_);
								if (G_UNLIKELY (_inner_error_ != NULL)) {
									g_propagate_error (error, _inner_error_);
									_g_free0 (attrval);
									_g_free0 (prefix);
									_g_free0 (attrname);
									return;
								}
							}
						}
						_g_free0 (attrval);
					}
					_g_free0 (prefix);
					_g_free0 (attrname);
				}
			}
		}
	}
}


/**
   * Iterates in all child nodes and append them to node.
   */
void gxml_xparser_read_child_nodes (GXmlXParser* self, GXmlDomNode* parent, GError** error) {
	xmlTextReader* _tmp0_ = NULL;
	gboolean cont = FALSE;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (parent != NULL);
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		const gchar* _tmp1_ = NULL;
		GError* _tmp2_ = NULL;
		_tmp1_ = _ ("Internal Error: No TextReader was set");
		_tmp2_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _tmp1_);
		_inner_error_ = _tmp2_;
		g_propagate_error (error, _inner_error_);
		return;
	}
	cont = TRUE;
	while (TRUE) {
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_ = FALSE;
		gboolean _tmp5_ = FALSE;
		gboolean _tmp6_ = FALSE;
		_tmp3_ = cont;
		if (!_tmp3_) {
			break;
		}
		_tmp5_ = gxml_xparser_move_next_node (self, &_inner_error_);
		_tmp4_ = _tmp5_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			g_propagate_error (error, _inner_error_);
			return;
		}
		if (!_tmp4_) {
			return;
		}
		_tmp6_ = gxml_xparser_current_is_element (self);
		if (_tmp6_) {
			gboolean _tmp7_ = FALSE;
			GXmlDomNode* _tmp8_ = NULL;
			gboolean _tmp9_ = FALSE;
			_tmp8_ = parent;
			_tmp9_ = gxml_xparser_read_child_element (self, _tmp8_, &_inner_error_);
			_tmp7_ = _tmp9_;
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				g_propagate_error (error, _inner_error_);
				return;
			}
			cont = _tmp7_;
		} else {
			gboolean _tmp10_ = FALSE;
			GXmlDomNode* _tmp11_ = NULL;
			gboolean _tmp12_ = FALSE;
			_tmp11_ = parent;
			_tmp12_ = gxml_xparser_read_child_node (self, _tmp11_, &_inner_error_);
			_tmp10_ = _tmp12_;
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				g_propagate_error (error, _inner_error_);
				return;
			}
			cont = _tmp10_;
		}
	}
}


/**
   * Creates a new {@link DomNode} and append it to
   * parent: depending on current node's type found by parser.
   *
   * If current found node is a {@link DomElement}, it is not parsed.
   * If you want to parse it use {@link read_element} method.
   *
   * Returns: true if node has been created and appended to parent.
   */
gboolean gxml_xparser_read_child_node (GXmlXParser* self, GXmlDomNode* parent, GError** error) {
	gboolean result = FALSE;
	xmlTextReader* _tmp0_ = NULL;
	GXmlDomNode* n = NULL;
	gboolean ret = FALSE;
	gint t = 0;
	xmlTextReader* _tmp4_ = NULL;
	gint _tmp5_ = 0;
	gint _tmp6_ = 0;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (parent != NULL, FALSE);
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		const gchar* _tmp1_ = NULL;
		GError* _tmp2_ = NULL;
		gboolean _tmp3_ = FALSE;
		_tmp1_ = _ ("Internal Error: No TextReader was set");
		_tmp2_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _tmp1_);
		_inner_error_ = _tmp2_;
		g_propagate_error (error, _inner_error_);
		return _tmp3_;
	}
	n = NULL;
	ret = TRUE;
	_tmp4_ = self->priv->tr;
	_tmp5_ = xmlTextReaderNodeType (_tmp4_);
	t = _tmp5_;
	_tmp6_ = t;
	switch (_tmp6_) {
		case XML_READER_TYPE_NONE:
		{
			gxml_xparser_move_next_node (self, &_inner_error_);
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				gboolean _tmp7_ = FALSE;
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (n);
				return _tmp7_;
			}
			break;
		}
		case XML_READER_TYPE_ATTRIBUTE:
		{
			break;
		}
		case XML_READER_TYPE_TEXT:
		{
			gchar* txtval = NULL;
			xmlTextReader* _tmp8_ = NULL;
			gchar* _tmp9_ = NULL;
			GXmlDomNode* _tmp10_ = NULL;
			_tmp8_ = self->priv->tr;
			_tmp9_ = (gchar*) xmlTextReaderReadString (_tmp8_);
			txtval = _tmp9_;
			_tmp10_ = parent;
			if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, GXML_TYPE_DOM_DOCUMENT)) {
				GXmlDomText* _tmp11_ = NULL;
				GXmlDomDocument* _tmp12_ = NULL;
				const gchar* _tmp13_ = NULL;
				GXmlDomText* _tmp14_ = NULL;
				GXmlDomText* _tmp16_ = NULL;
				GXmlDomNode* _tmp17_ = NULL;
				GXmlDomNode* _tmp18_ = NULL;
				GXmlDomNode* _tmp19_ = NULL;
				GXmlDomNode* _tmp20_ = NULL;
				_tmp12_ = self->priv->_document;
				_tmp13_ = txtval;
				_tmp14_ = gxml_dom_document_create_text_node (_tmp12_, _tmp13_, &_inner_error_);
				_tmp11_ = _tmp14_;
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					gboolean _tmp15_ = FALSE;
					g_propagate_error (error, _inner_error_);
					_g_free0 (txtval);
					_g_object_unref0 (n);
					return _tmp15_;
				}
				_tmp16_ = _tmp11_;
				_tmp11_ = NULL;
				_g_object_unref0 (n);
				n = (GXmlDomNode*) _tmp16_;
				_tmp17_ = parent;
				_tmp18_ = n;
				_tmp19_ = gxml_dom_node_append_child (_tmp17_, _tmp18_, &_inner_error_);
				_tmp20_ = _tmp19_;
				_g_object_unref0 (_tmp20_);
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					gboolean _tmp21_ = FALSE;
					g_propagate_error (error, _inner_error_);
					_g_object_unref0 (_tmp11_);
					_g_free0 (txtval);
					_g_object_unref0 (n);
					return _tmp21_;
				}
				_g_object_unref0 (_tmp11_);
			}
			_g_free0 (txtval);
			break;
		}
		case XML_READER_TYPE_CDATA:
		{
			break;
		}
		case XML_READER_TYPE_ENTITY_REFERENCE:
		{
			break;
		}
		case XML_READER_TYPE_ENTITY:
		{
			break;
		}
		case XML_READER_TYPE_PROCESSING_INSTRUCTION:
		{
			gchar* pit = NULL;
			xmlTextReader* _tmp22_ = NULL;
			const gchar* _tmp23_ = NULL;
			gchar* _tmp24_ = NULL;
			gchar* pival = NULL;
			xmlTextReader* _tmp25_ = NULL;
			gchar* _tmp26_ = NULL;
			GXmlDomProcessingInstruction* _tmp27_ = NULL;
			GXmlDomDocument* _tmp28_ = NULL;
			const gchar* _tmp29_ = NULL;
			const gchar* _tmp30_ = NULL;
			GXmlDomProcessingInstruction* _tmp31_ = NULL;
			GXmlDomProcessingInstruction* _tmp33_ = NULL;
			GXmlDomNode* _tmp34_ = NULL;
			GXmlDomNode* _tmp35_ = NULL;
			GXmlDomNode* _tmp36_ = NULL;
			GXmlDomNode* _tmp37_ = NULL;
			_tmp22_ = self->priv->tr;
			_tmp23_ = (const gchar*) xmlTextReaderConstLocalName (_tmp22_);
			_tmp24_ = g_strdup (_tmp23_);
			pit = _tmp24_;
			_tmp25_ = self->priv->tr;
			_tmp26_ = (gchar*) xmlTextReaderValue (_tmp25_);
			pival = _tmp26_;
			_tmp28_ = self->priv->_document;
			_tmp29_ = pit;
			_tmp30_ = pival;
			_tmp31_ = gxml_dom_document_create_processing_instruction (_tmp28_, _tmp29_, _tmp30_, &_inner_error_);
			_tmp27_ = _tmp31_;
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				gboolean _tmp32_ = FALSE;
				g_propagate_error (error, _inner_error_);
				_g_free0 (pival);
				_g_free0 (pit);
				_g_object_unref0 (n);
				return _tmp32_;
			}
			_tmp33_ = _tmp27_;
			_tmp27_ = NULL;
			_g_object_unref0 (n);
			n = (GXmlDomNode*) _tmp33_;
			_tmp34_ = parent;
			_tmp35_ = n;
			_tmp36_ = gxml_dom_node_append_child (_tmp34_, _tmp35_, &_inner_error_);
			_tmp37_ = _tmp36_;
			_g_object_unref0 (_tmp37_);
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				gboolean _tmp38_ = FALSE;
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (_tmp27_);
				_g_free0 (pival);
				_g_free0 (pit);
				_g_object_unref0 (n);
				return _tmp38_;
			}
			_g_object_unref0 (_tmp27_);
			_g_free0 (pival);
			_g_free0 (pit);
			break;
		}
		case XML_READER_TYPE_COMMENT:
		{
			gchar* commval = NULL;
			xmlTextReader* _tmp39_ = NULL;
			gchar* _tmp40_ = NULL;
			GXmlDomComment* _tmp41_ = NULL;
			GXmlDomDocument* _tmp42_ = NULL;
			const gchar* _tmp43_ = NULL;
			GXmlDomComment* _tmp44_ = NULL;
			GXmlDomComment* _tmp46_ = NULL;
			GXmlDomNode* _tmp47_ = NULL;
			GXmlDomNode* _tmp48_ = NULL;
			GXmlDomNode* _tmp49_ = NULL;
			GXmlDomNode* _tmp50_ = NULL;
			_tmp39_ = self->priv->tr;
			_tmp40_ = (gchar*) xmlTextReaderValue (_tmp39_);
			commval = _tmp40_;
			_tmp42_ = self->priv->_document;
			_tmp43_ = commval;
			_tmp44_ = gxml_dom_document_create_comment (_tmp42_, _tmp43_, &_inner_error_);
			_tmp41_ = _tmp44_;
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				gboolean _tmp45_ = FALSE;
				g_propagate_error (error, _inner_error_);
				_g_free0 (commval);
				_g_object_unref0 (n);
				return _tmp45_;
			}
			_tmp46_ = _tmp41_;
			_tmp41_ = NULL;
			_g_object_unref0 (n);
			n = (GXmlDomNode*) _tmp46_;
			_tmp47_ = parent;
			_tmp48_ = n;
			_tmp49_ = gxml_dom_node_append_child (_tmp47_, _tmp48_, &_inner_error_);
			_tmp50_ = _tmp49_;
			_g_object_unref0 (_tmp50_);
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				gboolean _tmp51_ = FALSE;
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (_tmp41_);
				_g_free0 (commval);
				_g_object_unref0 (n);
				return _tmp51_;
			}
			_g_object_unref0 (_tmp41_);
			_g_free0 (commval);
			break;
		}
		case XML_READER_TYPE_DOCUMENT:
		{
			ret = FALSE;
			break;
		}
		case XML_READER_TYPE_DOCUMENT_TYPE:
		{
			ret = FALSE;
			break;
		}
		case XML_READER_TYPE_DOCUMENT_FRAGMENT:
		{
			ret = FALSE;
			break;
		}
		case XML_READER_TYPE_NOTATION:
		{
			break;
		}
		case XML_READER_TYPE_WHITESPACE:
		{
			break;
		}
		case XML_READER_TYPE_SIGNIFICANT_WHITESPACE:
		{
			gchar* stxtval = NULL;
			xmlTextReader* _tmp52_ = NULL;
			gchar* _tmp53_ = NULL;
			GXmlDomNode* _tmp54_ = NULL;
			_tmp52_ = self->priv->tr;
			_tmp53_ = (gchar*) xmlTextReaderReadString (_tmp52_);
			stxtval = _tmp53_;
			_tmp54_ = parent;
			if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp54_, GXML_TYPE_DOM_DOCUMENT)) {
				GXmlDomText* _tmp55_ = NULL;
				GXmlDomDocument* _tmp56_ = NULL;
				const gchar* _tmp57_ = NULL;
				GXmlDomText* _tmp58_ = NULL;
				GXmlDomText* _tmp60_ = NULL;
				GXmlDomNode* _tmp61_ = NULL;
				GXmlDomNode* _tmp62_ = NULL;
				GXmlDomNode* _tmp63_ = NULL;
				GXmlDomNode* _tmp64_ = NULL;
				_tmp56_ = self->priv->_document;
				_tmp57_ = stxtval;
				_tmp58_ = gxml_dom_document_create_text_node (_tmp56_, _tmp57_, &_inner_error_);
				_tmp55_ = _tmp58_;
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					gboolean _tmp59_ = FALSE;
					g_propagate_error (error, _inner_error_);
					_g_free0 (stxtval);
					_g_object_unref0 (n);
					return _tmp59_;
				}
				_tmp60_ = _tmp55_;
				_tmp55_ = NULL;
				_g_object_unref0 (n);
				n = (GXmlDomNode*) _tmp60_;
				_tmp61_ = parent;
				_tmp62_ = n;
				_tmp63_ = gxml_dom_node_append_child (_tmp61_, _tmp62_, &_inner_error_);
				_tmp64_ = _tmp63_;
				_g_object_unref0 (_tmp64_);
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					gboolean _tmp65_ = FALSE;
					g_propagate_error (error, _inner_error_);
					_g_object_unref0 (_tmp55_);
					_g_free0 (stxtval);
					_g_object_unref0 (n);
					return _tmp65_;
				}
				_g_object_unref0 (_tmp55_);
			}
			_g_free0 (stxtval);
			break;
		}
		case XML_READER_TYPE_END_ELEMENT:
		{
			ret = FALSE;
			break;
		}
		case XML_READER_TYPE_END_ENTITY:
		{
			ret = FALSE;
			break;
		}
		case XML_READER_TYPE_XML_DECLARATION:
		{
			ret = FALSE;
			break;
		}
		case XML_READER_TYPE_ELEMENT:
		{
			ret = FALSE;
			break;
		}
		default:
		break;
	}
	result = ret;
	_g_object_unref0 (n);
	return result;
}


/**
   * Reads current found element
   */
gboolean gxml_xparser_read_child_element (GXmlXParser* self, GXmlDomNode* parent, GError** error) {
	gboolean result = FALSE;
	xmlTextReader* _tmp0_ = NULL;
	gboolean _tmp4_ = FALSE;
	gboolean isempty = FALSE;
	gboolean _tmp8_ = FALSE;
	GXmlDomNode* n = NULL;
	gboolean _tmp9_ = FALSE;
	GXmlDomNode* _tmp10_ = NULL;
	GXmlDomNode* _tmp11_ = NULL;
	gboolean _tmp12_ = FALSE;
	GXmlDomNode* _tmp26_ = NULL;
	gboolean _tmp27_ = FALSE;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (parent != NULL, FALSE);
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		const gchar* _tmp1_ = NULL;
		GError* _tmp2_ = NULL;
		gboolean _tmp3_ = FALSE;
		_tmp1_ = _ ("Internal Error: No TextReader was set");
		_tmp2_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _tmp1_);
		_inner_error_ = _tmp2_;
		g_propagate_error (error, _inner_error_);
		return _tmp3_;
	}
	_tmp4_ = gxml_xparser_current_is_element (self);
	if (!_tmp4_) {
		const gchar* _tmp5_ = NULL;
		GError* _tmp6_ = NULL;
		gboolean _tmp7_ = FALSE;
		_tmp5_ = _ ("Invalid attempt to parse an element node, when current found node is n" \
"ot");
		_tmp6_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_INVALID_NODE_TYPE_ERROR, _tmp5_);
		_inner_error_ = _tmp6_;
		g_propagate_error (error, _inner_error_);
		return _tmp7_;
	}
	_tmp8_ = gxml_xparser_current_is_empty_element (self);
	isempty = _tmp8_;
	n = NULL;
	_tmp10_ = parent;
	_tmp12_ = gxml_xparser_read_element_property (self, _tmp10_, &_tmp11_, &_inner_error_);
	_g_object_unref0 (n);
	n = _tmp11_;
	_tmp9_ = _tmp12_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		gboolean _tmp13_ = FALSE;
		g_propagate_error (error, _inner_error_);
		_g_object_unref0 (n);
		return _tmp13_;
	}
	if (!_tmp9_) {
		gboolean _tmp14_ = FALSE;
		GXmlDomNode* _tmp15_ = NULL;
		GXmlDomNode* _tmp16_ = NULL;
		gboolean _tmp17_ = FALSE;
		_tmp15_ = parent;
		_tmp17_ = gxml_xparser_add_element_collection (self, _tmp15_, &_tmp16_, &_inner_error_);
		_g_object_unref0 (n);
		n = _tmp16_;
		_tmp14_ = _tmp17_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			gboolean _tmp18_ = FALSE;
			g_propagate_error (error, _inner_error_);
			_g_object_unref0 (n);
			return _tmp18_;
		}
		if (!_tmp14_) {
			GXmlDomElement* _tmp19_ = NULL;
			GXmlDomNode* _tmp20_ = NULL;
			GXmlDomElement* _tmp21_ = NULL;
			GXmlDomElement* _tmp23_ = NULL;
			GXmlDomNode* _tmp24_ = NULL;
			_tmp20_ = parent;
			_tmp21_ = gxml_xparser_create_element (self, _tmp20_, &_inner_error_);
			_tmp19_ = _tmp21_;
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				gboolean _tmp22_ = FALSE;
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (n);
				return _tmp22_;
			}
			_tmp23_ = _tmp19_;
			_tmp19_ = NULL;
			_g_object_unref0 (n);
			n = (GXmlDomNode*) _tmp23_;
			_tmp24_ = n;
			gxml_xparser_read_element (self, G_TYPE_CHECK_INSTANCE_TYPE (_tmp24_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp24_) : NULL, &_inner_error_);
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				gboolean _tmp25_ = FALSE;
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (_tmp19_);
				_g_object_unref0 (n);
				return _tmp25_;
			}
			_g_object_unref0 (_tmp19_);
		}
	}
	_tmp26_ = n;
	if (_tmp26_ == NULL) {
		result = FALSE;
		_g_object_unref0 (n);
		return result;
	}
	_tmp27_ = isempty;
	if (!_tmp27_) {
		GXmlDomNode* _tmp28_ = NULL;
		_tmp28_ = n;
		gxml_xparser_read_child_nodes (self, _tmp28_, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			gboolean _tmp29_ = FALSE;
			g_propagate_error (error, _inner_error_);
			_g_object_unref0 (n);
			return _tmp29_;
		}
	}
	result = TRUE;
	_g_object_unref0 (n);
	return result;
}


/**
   * Creates a new {@link DomElement} and append it as a child of parent: for current
   * read node, only if parent: have a property as {@link DomElement} type and current
   * node have same local name as property element.
   *
   * Returns: true if element is set to a new object and it is set as a child of parent:
   * as a property.
   */
static gpointer _g_param_spec_ref0 (gpointer self) {
	return self ? g_param_spec_ref (self) : NULL;
}


static void _g_param_spec_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (g_param_spec_unref (var), NULL));
}


static void _g_list_free__g_param_spec_unref0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_param_spec_unref0_, NULL);
	g_list_free (self);
}


gboolean gxml_xparser_read_element_property (GXmlXParser* self, GXmlDomNode* parent, GXmlDomNode** element, GError** error) {
	GXmlDomNode* _vala_element = NULL;
	gboolean result = FALSE;
	xmlTextReader* _tmp0_ = NULL;
	GXmlDomNode* _tmp4_ = NULL;
	GXmlDomNode* _tmp5_ = NULL;
	GList* _tmp6_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (parent != NULL, FALSE);
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		const gchar* _tmp1_ = NULL;
		GError* _tmp2_ = NULL;
		gboolean _tmp3_ = FALSE;
		_tmp1_ = _ ("Internal Error: No TextReader was set");
		_tmp2_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _tmp1_);
		_inner_error_ = _tmp2_;
		g_propagate_error (error, _inner_error_);
		return _tmp3_;
	}
	_tmp4_ = parent;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, GXML_TYPE_GOM_OBJECT)) {
		result = FALSE;
		if (element) {
			*element = _vala_element;
		} else {
			_g_object_unref0 (_vala_element);
		}
		return result;
	}
	_tmp5_ = parent;
	_tmp6_ = gxml_gom_object_get_property_element_list (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, GXML_TYPE_GOM_OBJECT) ? ((GXmlGomObject*) _tmp5_) : NULL);
	{
		GList* pspec_collection = NULL;
		GList* pspec_it = NULL;
		pspec_collection = _tmp6_;
		for (pspec_it = pspec_collection; pspec_it != NULL; pspec_it = pspec_it->next) {
			GParamSpec* _tmp7_ = NULL;
			GParamSpec* pspec = NULL;
			_tmp7_ = _g_param_spec_ref0 ((GParamSpec*) pspec_it->data);
			pspec = _tmp7_;
			{
				GParamSpec* _tmp8_ = NULL;
				GType _tmp9_ = 0UL;
				gboolean _tmp10_ = FALSE;
				GXmlDomElement* obj = NULL;
				GParamSpec* _tmp11_ = NULL;
				GType _tmp12_ = 0UL;
				GXmlDomDocument* _tmp13_ = NULL;
				GObject* _tmp14_ = NULL;
				GObject* _tmp15_ = NULL;
				GXmlDomElement* _tmp16_ = NULL;
				GXmlDomElement* _tmp17_ = NULL;
				gchar* _tmp18_ = NULL;
				gchar* _tmp19_ = NULL;
				gchar* _tmp20_ = NULL;
				gchar* _tmp21_ = NULL;
				gchar* _tmp22_ = NULL;
				xmlTextReader* _tmp23_ = NULL;
				const gchar* _tmp24_ = NULL;
				gchar* _tmp25_ = NULL;
				gchar* _tmp26_ = NULL;
				gboolean _tmp27_ = FALSE;
				_tmp8_ = pspec;
				_tmp9_ = _tmp8_->value_type;
				_tmp10_ = g_type_is_a (_tmp9_, GXML_TYPE_GOM_COLLECTION);
				if (_tmp10_) {
					_g_param_spec_unref0 (pspec);
					continue;
				}
				_tmp11_ = pspec;
				_tmp12_ = _tmp11_->value_type;
				_tmp13_ = self->priv->_document;
				_tmp14_ = g_object_new (_tmp12_, "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_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp15_) : NULL;
				if (_tmp16_ == NULL) {
					_g_object_unref0 (_tmp15_);
				}
				obj = _tmp16_;
				_tmp17_ = obj;
				_tmp18_ = gxml_dom_element_get_local_name (_tmp17_);
				_tmp19_ = _tmp18_;
				_tmp20_ = _tmp19_;
				_tmp21_ = g_utf8_strdown (_tmp20_, (gssize) -1);
				_tmp22_ = _tmp21_;
				_tmp23_ = self->priv->tr;
				_tmp24_ = (const gchar*) xmlTextReaderConstLocalName (_tmp23_);
				_tmp25_ = g_utf8_strdown (_tmp24_, (gssize) -1);
				_tmp26_ = _tmp25_;
				_tmp27_ = g_strcmp0 (_tmp22_, _tmp26_) == 0;
				_g_free0 (_tmp26_);
				_g_free0 (_tmp22_);
				_g_free0 (_tmp20_);
				if (_tmp27_) {
					GValue v = {0};
					GParamSpec* _tmp28_ = NULL;
					GType _tmp29_ = 0UL;
					GValue _tmp30_ = {0};
					GXmlDomNode* _tmp31_ = NULL;
					GXmlDomElement* _tmp32_ = NULL;
					GXmlDomNode* _tmp33_ = NULL;
					GXmlDomNode* _tmp34_ = NULL;
					GXmlDomElement* _tmp36_ = NULL;
					GXmlDomNode* _tmp37_ = NULL;
					GParamSpec* _tmp38_ = NULL;
					const gchar* _tmp39_ = NULL;
					GValue _tmp40_ = {0};
					GXmlDomElement* _tmp41_ = NULL;
					GXmlDomElement* _tmp43_ = NULL;
					GXmlDomNode* _tmp44_ = NULL;
					_tmp28_ = pspec;
					_tmp29_ = _tmp28_->value_type;
					g_value_init (&_tmp30_, _tmp29_);
					v = _tmp30_;
					_tmp31_ = parent;
					_tmp32_ = obj;
					_tmp33_ = gxml_dom_node_append_child (_tmp31_, G_TYPE_CHECK_INSTANCE_TYPE (_tmp32_, GXML_TYPE_DOM_NODE) ? ((GXmlDomNode*) _tmp32_) : NULL, &_inner_error_);
					_tmp34_ = _tmp33_;
					_g_object_unref0 (_tmp34_);
					if (G_UNLIKELY (_inner_error_ != NULL)) {
						gboolean _tmp35_ = FALSE;
						g_propagate_error (error, _inner_error_);
						G_IS_VALUE (&v) ? (g_value_unset (&v), NULL) : NULL;
						_g_object_unref0 (obj);
						_g_param_spec_unref0 (pspec);
						__g_list_free__g_param_spec_unref0_0 (pspec_collection);
						return _tmp35_;
					}
					_tmp36_ = obj;
					g_value_set_object (&v, (GObject*) _tmp36_);
					_tmp37_ = parent;
					_tmp38_ = pspec;
					_tmp39_ = _tmp38_->name;
					_tmp40_ = v;
					g_object_set_property ((GObject*) _tmp37_, _tmp39_, &_tmp40_);
					_tmp41_ = obj;
					gxml_xparser_read_element (self, G_TYPE_CHECK_INSTANCE_TYPE (_tmp41_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp41_) : NULL, &_inner_error_);
					if (G_UNLIKELY (_inner_error_ != NULL)) {
						gboolean _tmp42_ = FALSE;
						g_propagate_error (error, _inner_error_);
						G_IS_VALUE (&v) ? (g_value_unset (&v), NULL) : NULL;
						_g_object_unref0 (obj);
						_g_param_spec_unref0 (pspec);
						__g_list_free__g_param_spec_unref0_0 (pspec_collection);
						return _tmp42_;
					}
					_tmp43_ = obj;
					_tmp44_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp43_, GXML_TYPE_DOM_NODE) ? ((GXmlDomNode*) _tmp43_) : NULL);
					_g_object_unref0 (_vala_element);
					_vala_element = _tmp44_;
					result = TRUE;
					G_IS_VALUE (&v) ? (g_value_unset (&v), NULL) : NULL;
					_g_object_unref0 (obj);
					_g_param_spec_unref0 (pspec);
					__g_list_free__g_param_spec_unref0_0 (pspec_collection);
					if (element) {
						*element = _vala_element;
					} else {
						_g_object_unref0 (_vala_element);
					}
					return result;
				}
				_g_object_unref0 (obj);
				_g_param_spec_unref0 (pspec);
			}
		}
		__g_list_free__g_param_spec_unref0_0 (pspec_collection);
	}
	result = FALSE;
	if (element) {
		*element = _vala_element;
	} else {
		_g_object_unref0 (_vala_element);
	}
	return result;
}


/**
   * Creates a new {@link DomElement} and append it as a child of parent: for current
   * read node, only if parent: have a property as {@link GomCollection} type and current
   * node have same local name as collection {@link GomCollection.items_name}
   *
   * Returns: true if element is set to a new object, it is set as a child of parent:
   * and has been added to a parent:'s collection property.
   */
gboolean gxml_xparser_add_element_collection (GXmlXParser* self, GXmlDomNode* parent, GXmlDomNode** element, GError** error) {
	GXmlDomNode* _vala_element = NULL;
	gboolean result = FALSE;
	GXmlDomNode* _tmp0_ = NULL;
	GXmlDomNode* _tmp1_ = NULL;
	GList* _tmp2_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (parent != NULL, FALSE);
	_tmp0_ = parent;
	if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GXML_TYPE_GOM_OBJECT)) {
		result = FALSE;
		if (element) {
			*element = _vala_element;
		} else {
			_g_object_unref0 (_vala_element);
		}
		return result;
	}
	_tmp1_ = parent;
	_tmp2_ = gxml_gom_object_get_property_element_list (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, GXML_TYPE_GOM_OBJECT) ? ((GXmlGomObject*) _tmp1_) : NULL);
	{
		GList* pspec_collection = NULL;
		GList* pspec_it = NULL;
		pspec_collection = _tmp2_;
		for (pspec_it = pspec_collection; pspec_it != NULL; pspec_it = pspec_it->next) {
			GParamSpec* _tmp3_ = NULL;
			GParamSpec* pspec = NULL;
			_tmp3_ = _g_param_spec_ref0 ((GParamSpec*) pspec_it->data);
			pspec = _tmp3_;
			{
				GParamSpec* _tmp4_ = NULL;
				GType _tmp5_ = 0UL;
				gboolean _tmp6_ = FALSE;
				GXmlGomCollection* col = NULL;
				GValue vc = {0};
				GParamSpec* _tmp7_ = NULL;
				GType _tmp8_ = 0UL;
				GValue _tmp9_ = {0};
				GXmlDomNode* _tmp10_ = NULL;
				GParamSpec* _tmp11_ = NULL;
				const gchar* _tmp12_ = NULL;
				GObject* _tmp13_ = NULL;
				GXmlGomCollection* _tmp14_ = NULL;
				GXmlGomCollection* _tmp15_ = NULL;
				gboolean _tmp27_ = FALSE;
				GXmlGomCollection* _tmp28_ = NULL;
				GType _tmp29_ = 0UL;
				GType _tmp30_ = 0UL;
				gboolean _tmp38_ = FALSE;
				GXmlGomCollection* _tmp39_ = NULL;
				const gchar* _tmp40_ = NULL;
				const gchar* _tmp41_ = NULL;
				gboolean _tmp48_ = FALSE;
				GXmlGomCollection* _tmp49_ = NULL;
				GXmlGomElement* _tmp50_ = NULL;
				GXmlGomElement* _tmp51_ = NULL;
				GXmlGomCollection* _tmp58_ = NULL;
				const gchar* _tmp59_ = NULL;
				const gchar* _tmp60_ = NULL;
				gchar* _tmp61_ = NULL;
				gchar* _tmp62_ = NULL;
				gchar* _tmp63_ = NULL;
				gchar* _tmp64_ = NULL;
				gchar* _tmp65_ = NULL;
				gchar* _tmp66_ = NULL;
				gboolean _tmp67_ = FALSE;
				_tmp4_ = pspec;
				_tmp5_ = _tmp4_->value_type;
				_tmp6_ = g_type_is_a (_tmp5_, GXML_TYPE_GOM_COLLECTION);
				if (!_tmp6_) {
					_g_param_spec_unref0 (pspec);
					continue;
				}
				_tmp7_ = pspec;
				_tmp8_ = _tmp7_->value_type;
				g_value_init (&_tmp9_, _tmp8_);
				vc = _tmp9_;
				_tmp10_ = parent;
				_tmp11_ = pspec;
				_tmp12_ = _tmp11_->name;
				g_object_get_property ((GObject*) _tmp10_, _tmp12_, &vc);
				_tmp13_ = g_value_get_object (&vc);
				_tmp14_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, GXML_TYPE_GOM_COLLECTION) ? ((GXmlGomCollection*) _tmp13_) : NULL);
				_g_object_unref0 (col);
				col = _tmp14_;
				_tmp15_ = col;
				if (_tmp15_ == NULL) {
					GParamSpec* _tmp16_ = NULL;
					GType _tmp17_ = 0UL;
					GXmlDomNode* _tmp18_ = NULL;
					GObject* _tmp19_ = NULL;
					GObject* _tmp20_ = NULL;
					GXmlGomCollection* _tmp21_ = NULL;
					GXmlGomCollection* _tmp22_ = NULL;
					GXmlDomNode* _tmp23_ = NULL;
					GParamSpec* _tmp24_ = NULL;
					const gchar* _tmp25_ = NULL;
					GValue _tmp26_ = {0};
					_tmp16_ = pspec;
					_tmp17_ = _tmp16_->value_type;
					_tmp18_ = parent;
					_tmp19_ = g_object_new (_tmp17_, "element", _tmp18_, NULL);
					_tmp20_ = G_IS_INITIALLY_UNOWNED (_tmp19_) ? g_object_ref_sink (_tmp19_) : _tmp19_;
					_tmp21_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp20_, GXML_TYPE_GOM_COLLECTION) ? ((GXmlGomCollection*) _tmp20_) : NULL;
					if (_tmp21_ == NULL) {
						_g_object_unref0 (_tmp20_);
					}
					_g_object_unref0 (col);
					col = _tmp21_;
					_tmp22_ = col;
					g_value_set_object (&vc, (GObject*) _tmp22_);
					_tmp23_ = parent;
					_tmp24_ = pspec;
					_tmp25_ = _tmp24_->name;
					_tmp26_ = vc;
					g_object_set_property ((GObject*) _tmp23_, _tmp25_, &_tmp26_);
				}
				_tmp28_ = col;
				_tmp29_ = gxml_gom_collection_get_items_type (_tmp28_);
				_tmp30_ = _tmp29_;
				if (_tmp30_ == G_TYPE_INVALID) {
					_tmp27_ = TRUE;
				} else {
					GXmlGomCollection* _tmp31_ = NULL;
					GType _tmp32_ = 0UL;
					GType _tmp33_ = 0UL;
					gboolean _tmp34_ = FALSE;
					_tmp31_ = col;
					_tmp32_ = gxml_gom_collection_get_items_type (_tmp31_);
					_tmp33_ = _tmp32_;
					_tmp34_ = g_type_is_a (_tmp33_, GXML_TYPE_GOM_OBJECT);
					_tmp27_ = !_tmp34_;
				}
				if (_tmp27_) {
					const gchar* _tmp35_ = NULL;
					GError* _tmp36_ = NULL;
					gboolean _tmp37_ = FALSE;
					_tmp35_ = _ ("Invalid object type set to Collection");
					_tmp36_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_INVALID_NODE_TYPE_ERROR, _tmp35_);
					_inner_error_ = _tmp36_;
					g_propagate_error (error, _inner_error_);
					G_IS_VALUE (&vc) ? (g_value_unset (&vc), NULL) : NULL;
					_g_object_unref0 (col);
					_g_param_spec_unref0 (pspec);
					__g_list_free__g_param_spec_unref0_0 (pspec_collection);
					return _tmp37_;
				}
				_tmp39_ = col;
				_tmp40_ = gxml_gom_collection_get_items_name (_tmp39_);
				_tmp41_ = _tmp40_;
				if (g_strcmp0 (_tmp41_, "") == 0) {
					_tmp38_ = TRUE;
				} else {
					GXmlGomCollection* _tmp42_ = NULL;
					const gchar* _tmp43_ = NULL;
					const gchar* _tmp44_ = NULL;
					_tmp42_ = col;
					_tmp43_ = gxml_gom_collection_get_items_name (_tmp42_);
					_tmp44_ = _tmp43_;
					_tmp38_ = _tmp44_ == NULL;
				}
				if (_tmp38_) {
					const gchar* _tmp45_ = NULL;
					GError* _tmp46_ = NULL;
					gboolean _tmp47_ = FALSE;
					_tmp45_ = _ ("Invalid DomElement name for objects in Collection");
					_tmp46_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_INVALID_NODE_TYPE_ERROR, _tmp45_);
					_inner_error_ = _tmp46_;
					g_propagate_error (error, _inner_error_);
					G_IS_VALUE (&vc) ? (g_value_unset (&vc), NULL) : NULL;
					_g_object_unref0 (col);
					_g_param_spec_unref0 (pspec);
					__g_list_free__g_param_spec_unref0_0 (pspec_collection);
					return _tmp47_;
				}
				_tmp49_ = col;
				_tmp50_ = gxml_gom_collection_get_element (_tmp49_);
				_tmp51_ = _tmp50_;
				if (_tmp51_ == NULL) {
					_tmp48_ = TRUE;
				} else {
					GXmlGomCollection* _tmp52_ = NULL;
					GXmlGomElement* _tmp53_ = NULL;
					GXmlGomElement* _tmp54_ = NULL;
					_tmp52_ = col;
					_tmp53_ = gxml_gom_collection_get_element (_tmp52_);
					_tmp54_ = _tmp53_;
					_tmp48_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp54_, GXML_TYPE_GOM_ELEMENT);
				}
				if (_tmp48_) {
					const gchar* _tmp55_ = NULL;
					GError* _tmp56_ = NULL;
					gboolean _tmp57_ = FALSE;
					_tmp55_ = _ ("Invalid Element set to Collection");
					_tmp56_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_INVALID_NODE_TYPE_ERROR, _tmp55_);
					_inner_error_ = _tmp56_;
					g_propagate_error (error, _inner_error_);
					G_IS_VALUE (&vc) ? (g_value_unset (&vc), NULL) : NULL;
					_g_object_unref0 (col);
					_g_param_spec_unref0 (pspec);
					__g_list_free__g_param_spec_unref0_0 (pspec_collection);
					return _tmp57_;
				}
				_tmp58_ = col;
				_tmp59_ = gxml_gom_collection_get_items_name (_tmp58_);
				_tmp60_ = _tmp59_;
				_tmp61_ = g_utf8_strdown (_tmp60_, (gssize) -1);
				_tmp62_ = _tmp61_;
				_tmp63_ = gxml_xparser_current_node_name (self);
				_tmp64_ = _tmp63_;
				_tmp65_ = g_utf8_strdown (_tmp64_, (gssize) -1);
				_tmp66_ = _tmp65_;
				_tmp67_ = g_strcmp0 (_tmp62_, _tmp66_) == 0;
				_g_free0 (_tmp66_);
				_g_free0 (_tmp64_);
				_g_free0 (_tmp62_);
				if (_tmp67_) {
					GXmlDomNode* _tmp68_ = NULL;
					GXmlDomDocument* _tmp69_ = NULL;
					GXmlDomDocument* _tmp70_ = NULL;
					GXmlDomElement* obj = NULL;
					GXmlGomCollection* _tmp74_ = NULL;
					GType _tmp75_ = 0UL;
					GType _tmp76_ = 0UL;
					GXmlDomDocument* _tmp77_ = NULL;
					GObject* _tmp78_ = NULL;
					GObject* _tmp79_ = NULL;
					GXmlDomElement* _tmp80_ = NULL;
					GXmlDomElement* _tmp81_ = NULL;
					GXmlGomCollection* _tmp83_ = NULL;
					GXmlDomElement* _tmp84_ = NULL;
					GXmlDomElement* _tmp86_ = NULL;
					GXmlDomNode* _tmp87_ = NULL;
					_tmp68_ = parent;
					_tmp69_ = gxml_dom_node_get_owner_document (_tmp68_);
					_tmp70_ = _tmp69_;
					if (_tmp70_ == NULL) {
						const gchar* _tmp71_ = NULL;
						GError* _tmp72_ = NULL;
						gboolean _tmp73_ = FALSE;
						_tmp71_ = _ ("No document is set to node");
						_tmp72_ = g_error_new_literal (GXML_DOM_ERROR, GXML_DOM_ERROR_HIERARCHY_REQUEST_ERROR, _tmp71_);
						_inner_error_ = _tmp72_;
						g_propagate_error (error, _inner_error_);
						G_IS_VALUE (&vc) ? (g_value_unset (&vc), NULL) : NULL;
						_g_object_unref0 (col);
						_g_param_spec_unref0 (pspec);
						__g_list_free__g_param_spec_unref0_0 (pspec_collection);
						return _tmp73_;
					}
					_tmp74_ = col;
					_tmp75_ = gxml_gom_collection_get_items_type (_tmp74_);
					_tmp76_ = _tmp75_;
					_tmp77_ = self->priv->_document;
					_tmp78_ = g_object_new (_tmp76_, "owner-document", _tmp77_, NULL);
					_tmp79_ = G_IS_INITIALLY_UNOWNED (_tmp78_) ? g_object_ref_sink (_tmp78_) : _tmp78_;
					_tmp80_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp79_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp79_) : NULL;
					if (_tmp80_ == NULL) {
						_g_object_unref0 (_tmp79_);
					}
					obj = _tmp80_;
					_tmp81_ = obj;
					gxml_xparser_read_element (self, G_TYPE_CHECK_INSTANCE_TYPE (_tmp81_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp81_) : NULL, &_inner_error_);
					if (G_UNLIKELY (_inner_error_ != NULL)) {
						gboolean _tmp82_ = FALSE;
						g_propagate_error (error, _inner_error_);
						_g_object_unref0 (obj);
						G_IS_VALUE (&vc) ? (g_value_unset (&vc), NULL) : NULL;
						_g_object_unref0 (col);
						_g_param_spec_unref0 (pspec);
						__g_list_free__g_param_spec_unref0_0 (pspec_collection);
						return _tmp82_;
					}
					_tmp83_ = col;
					_tmp84_ = obj;
					gxml_gom_collection_append (_tmp83_, _tmp84_, &_inner_error_);
					if (G_UNLIKELY (_inner_error_ != NULL)) {
						gboolean _tmp85_ = FALSE;
						g_propagate_error (error, _inner_error_);
						_g_object_unref0 (obj);
						G_IS_VALUE (&vc) ? (g_value_unset (&vc), NULL) : NULL;
						_g_object_unref0 (col);
						_g_param_spec_unref0 (pspec);
						__g_list_free__g_param_spec_unref0_0 (pspec_collection);
						return _tmp85_;
					}
					_tmp86_ = obj;
					_tmp87_ = _g_object_ref0 ((GXmlDomNode*) _tmp86_);
					_g_object_unref0 (_vala_element);
					_vala_element = _tmp87_;
					result = TRUE;
					_g_object_unref0 (obj);
					G_IS_VALUE (&vc) ? (g_value_unset (&vc), NULL) : NULL;
					_g_object_unref0 (col);
					_g_param_spec_unref0 (pspec);
					__g_list_free__g_param_spec_unref0_0 (pspec_collection);
					if (element) {
						*element = _vala_element;
					} else {
						_g_object_unref0 (_vala_element);
					}
					return result;
				}
				G_IS_VALUE (&vc) ? (g_value_unset (&vc), NULL) : NULL;
				_g_object_unref0 (col);
				_g_param_spec_unref0 (pspec);
			}
		}
		__g_list_free__g_param_spec_unref0_0 (pspec_collection);
	}
	result = FALSE;
	if (element) {
		*element = _vala_element;
	} else {
		_g_object_unref0 (_vala_element);
	}
	return result;
}


static gchar* gxml_xparser_dump (GXmlXParser* self, GError** error) {
	gchar* result = NULL;
	gint size = 0;
	xmlDoc* doc = NULL;
	xmlTextWriter* _tmp0_ = NULL;
	GXmlDomNode* _tmp1_ = NULL;
	xmlTextWriter* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	GXmlDomNode* _tmp6_ = NULL;
	GXmlDomNode* _tmp14_ = NULL;
	xmlTextWriter* _tmp15_ = NULL;
	xmlTextWriter* _tmp16_ = NULL;
	xmlTextWriter* _tmp17_ = NULL;
	gchar* str = NULL;
	xmlDoc* _tmp18_ = NULL;
	gchar* _tmp19_ = NULL;
	gint _tmp20_ = 0;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	doc = NULL;
	_tmp0_ = xmlNewTextWriterDoc (&doc, FALSE);
	_xmlFreeTextWriter0 (self->priv->tw);
	self->priv->tw = _tmp0_;
	_tmp1_ = self->priv->_node;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, GXML_TYPE_DOM_DOCUMENT)) {
		xmlTextWriter* _tmp2_ = NULL;
		_tmp2_ = self->priv->tw;
		xmlTextWriterStartDocument (_tmp2_, NULL, NULL, NULL);
	}
	_tmp3_ = self->priv->tw;
	_tmp4_ = gxml_parser_get_indent ((GXmlParser*) self);
	_tmp5_ = _tmp4_;
	xmlTextWriterSetIndent (_tmp3_, _tmp5_);
	_tmp6_ = self->priv->_node;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, GXML_TYPE_DOM_DOCUMENT)) {
		GXmlDomNode* _tmp7_ = NULL;
		GXmlDomNode* _tmp8_ = NULL;
		GXmlDomElement* _tmp9_ = NULL;
		GXmlDomElement* _tmp10_ = NULL;
		GXmlDomElement* _tmp11_ = NULL;
		gboolean _tmp12_ = FALSE;
		_tmp7_ = gxml_parser_get_node ((GXmlParser*) self);
		_tmp8_ = _tmp7_;
		_tmp9_ = gxml_dom_document_get_document_element (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, GXML_TYPE_DOM_DOCUMENT) ? ((GXmlDomDocument*) _tmp8_) : NULL);
		_tmp10_ = _tmp9_;
		_tmp11_ = _tmp10_;
		_tmp12_ = _tmp11_ == NULL;
		_g_object_unref0 (_tmp11_);
		if (_tmp12_) {
			xmlTextWriter* _tmp13_ = NULL;
			_tmp13_ = self->priv->tw;
			xmlTextWriterEndDocument (_tmp13_);
		}
	}
	_tmp14_ = self->priv->_node;
	gxml_xparser_start_node (self, _tmp14_, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		_xmlFreeDoc0 (doc);
		return NULL;
	}
	_tmp15_ = self->priv->tw;
	xmlTextWriterEndElement (_tmp15_);
	_tmp16_ = self->priv->tw;
	xmlTextWriterEndDocument (_tmp16_);
	_tmp17_ = self->priv->tw;
	xmlTextWriterFlush (_tmp17_);
	_tmp18_ = doc;
	xmlDocDumpMemory (_tmp18_, (xmlChar**) (&_tmp19_), &_tmp20_);
	_g_free0 (str);
	str = _tmp19_;
	size = _tmp20_;
	_xmlFreeTextWriter0 (self->priv->tw);
	self->priv->tw = NULL;
	result = str;
	_xmlFreeDoc0 (doc);
	return result;
}


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


static gboolean string_contains (const gchar* self, const gchar* needle) {
	gboolean result = FALSE;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = needle;
	_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
	result = _tmp1_ != NULL;
	return result;
}


static void gxml_xparser_start_node (GXmlXParser* self, GXmlDomNode* node, GError** error) {
	xmlTextWriter* _tmp0_ = NULL;
	gint size = 0;
	GXmlDomNode* _tmp3_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (node != NULL);
	_tmp0_ = self->priv->tw;
	if (_tmp0_ == NULL) {
		const gchar* _tmp1_ = NULL;
		GError* _tmp2_ = NULL;
		_tmp1_ = _ ("Internal Error: No TextWriter initialized");
		_tmp2_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _tmp1_);
		_inner_error_ = _tmp2_;
		g_propagate_error (error, _inner_error_);
		return;
	}
	size = 0;
	_tmp3_ = node;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, GXML_TYPE_DOM_ELEMENT)) {
		GXmlDomNode* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
		gboolean _tmp8_ = FALSE;
		GList* lp = NULL;
		GXmlDomNode* _tmp53_ = NULL;
		GList* _tmp54_ = NULL;
		GList* _tmp55_ = NULL;
		_tmp4_ = node;
		_tmp5_ = gxml_dom_element_get_namespace_uri (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp4_) : NULL);
		_tmp6_ = _tmp5_;
		_tmp7_ = _tmp6_;
		_tmp8_ = _tmp7_ != NULL;
		_g_free0 (_tmp7_);
		if (_tmp8_) {
			gchar* lpns = NULL;
			GXmlDomNode* _tmp9_ = NULL;
			GXmlDomNode* _tmp10_ = NULL;
			GXmlDomNode* _tmp11_ = NULL;
			GXmlDomNode* _tmp12_ = NULL;
			GXmlDomNode* _tmp13_ = NULL;
			gchar* _tmp14_ = NULL;
			gchar* _tmp15_ = NULL;
			gchar* _tmp16_ = NULL;
			gchar* _tmp17_ = NULL;
			gchar* _tmp18_ = NULL;
			gboolean _tmp19_ = FALSE;
			const gchar* _tmp20_ = NULL;
			GXmlDomNode* _tmp21_ = NULL;
			gchar* _tmp22_ = NULL;
			gchar* _tmp23_ = NULL;
			gchar* _tmp24_ = NULL;
			gboolean _tmp25_ = FALSE;
			_tmp9_ = node;
			_tmp10_ = gxml_dom_node_get_parent_node (_tmp9_);
			_tmp11_ = _tmp10_;
			_tmp12_ = _tmp11_;
			_tmp13_ = node;
			_tmp14_ = gxml_dom_element_get_namespace_uri (G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp13_) : NULL);
			_tmp15_ = _tmp14_;
			_tmp16_ = _tmp15_;
			_tmp17_ = gxml_dom_node_lookup_prefix (_tmp12_, _tmp16_);
			_tmp18_ = _tmp17_;
			_g_free0 (_tmp16_);
			_g_object_unref0 (_tmp12_);
			lpns = _tmp18_;
			_tmp20_ = lpns;
			_tmp21_ = node;
			_tmp22_ = gxml_dom_element_get_prefix (G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp21_) : NULL);
			_tmp23_ = _tmp22_;
			_tmp24_ = _tmp23_;
			_tmp25_ = g_strcmp0 (_tmp20_, _tmp24_) == 0;
			_g_free0 (_tmp24_);
			if (_tmp25_) {
				GXmlDomNode* _tmp26_ = NULL;
				gchar* _tmp27_ = NULL;
				gchar* _tmp28_ = NULL;
				gchar* _tmp29_ = NULL;
				_tmp26_ = node;
				_tmp27_ = gxml_dom_element_get_prefix (G_TYPE_CHECK_INSTANCE_TYPE (_tmp26_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp26_) : NULL);
				_tmp28_ = _tmp27_;
				_tmp29_ = _tmp28_;
				_tmp19_ = _tmp29_ != NULL;
				_g_free0 (_tmp29_);
			} else {
				_tmp19_ = FALSE;
			}
			if (_tmp19_) {
				xmlTextWriter* _tmp30_ = NULL;
				GXmlDomNode* _tmp31_ = NULL;
				gchar* _tmp32_ = NULL;
				gchar* _tmp33_ = NULL;
				gchar* _tmp34_ = NULL;
				_tmp30_ = self->priv->tw;
				_tmp31_ = node;
				_tmp32_ = gxml_dom_node_get_node_name (_tmp31_);
				_tmp33_ = _tmp32_;
				_tmp34_ = _tmp33_;
				xmlTextWriterStartElement (_tmp30_, (xmlChar*) _tmp34_);
				_g_free0 (_tmp34_);
			} else {
				xmlTextWriter* _tmp35_ = NULL;
				GXmlDomNode* _tmp36_ = NULL;
				gchar* _tmp37_ = NULL;
				gchar* _tmp38_ = NULL;
				gchar* _tmp39_ = NULL;
				GXmlDomNode* _tmp40_ = NULL;
				gchar* _tmp41_ = NULL;
				gchar* _tmp42_ = NULL;
				gchar* _tmp43_ = NULL;
				GXmlDomNode* _tmp44_ = NULL;
				gchar* _tmp45_ = NULL;
				gchar* _tmp46_ = NULL;
				gchar* _tmp47_ = NULL;
				_tmp35_ = self->priv->tw;
				_tmp36_ = node;
				_tmp37_ = gxml_dom_element_get_prefix (G_TYPE_CHECK_INSTANCE_TYPE (_tmp36_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp36_) : NULL);
				_tmp38_ = _tmp37_;
				_tmp39_ = _tmp38_;
				_tmp40_ = node;
				_tmp41_ = gxml_dom_element_get_local_name (G_TYPE_CHECK_INSTANCE_TYPE (_tmp40_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp40_) : NULL);
				_tmp42_ = _tmp41_;
				_tmp43_ = _tmp42_;
				_tmp44_ = node;
				_tmp45_ = gxml_dom_element_get_namespace_uri (G_TYPE_CHECK_INSTANCE_TYPE (_tmp44_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp44_) : NULL);
				_tmp46_ = _tmp45_;
				_tmp47_ = _tmp46_;
				xmlTextWriterStartElementNS (_tmp35_, (xmlChar*) _tmp39_, (xmlChar*) _tmp43_, (xmlChar*) _tmp47_);
				_g_free0 (_tmp47_);
				_g_free0 (_tmp43_);
				_g_free0 (_tmp39_);
			}
			_g_free0 (lpns);
		} else {
			xmlTextWriter* _tmp48_ = NULL;
			GXmlDomNode* _tmp49_ = NULL;
			gchar* _tmp50_ = NULL;
			gchar* _tmp51_ = NULL;
			gchar* _tmp52_ = NULL;
			_tmp48_ = self->priv->tw;
			_tmp49_ = node;
			_tmp50_ = gxml_dom_element_get_local_name (G_TYPE_CHECK_INSTANCE_TYPE (_tmp49_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp49_) : NULL);
			_tmp51_ = _tmp50_;
			_tmp52_ = _tmp51_;
			xmlTextWriterStartElement (_tmp48_, (xmlChar*) _tmp52_);
			_g_free0 (_tmp52_);
		}
		_tmp53_ = node;
		_tmp54_ = gxml_gom_object_get_properties_list (G_TYPE_CHECK_INSTANCE_TYPE (_tmp53_, GXML_TYPE_GOM_OBJECT) ? ((GXmlGomObject*) _tmp53_) : NULL);
		lp = _tmp54_;
		_tmp55_ = lp;
		{
			GList* pspec_collection = NULL;
			GList* pspec_it = NULL;
			pspec_collection = _tmp55_;
			for (pspec_it = pspec_collection; pspec_it != NULL; pspec_it = pspec_it->next) {
				GParamSpec* _tmp56_ = NULL;
				GParamSpec* pspec = NULL;
				_tmp56_ = _g_param_spec_ref0 ((GParamSpec*) pspec_it->data);
				pspec = _tmp56_;
				{
					gchar* attname = NULL;
					GParamSpec* _tmp57_ = NULL;
					const gchar* _tmp58_ = NULL;
					gchar* _tmp59_ = NULL;
					gchar* val = NULL;
					GParamSpec* _tmp60_ = NULL;
					GType _tmp61_ = 0UL;
					gboolean _tmp62_ = FALSE;
					const gchar* _tmp78_ = NULL;
					gint _tmp79_ = 0;
					xmlTextWriter* _tmp80_ = NULL;
					const gchar* _tmp81_ = NULL;
					const gchar* _tmp82_ = NULL;
					gint _tmp83_ = 0;
					gint _tmp84_ = 0;
					xmlTextWriter* _tmp85_ = NULL;
					gint _tmp86_ = 0;
					gint _tmp87_ = 0;
					_tmp57_ = pspec;
					_tmp58_ = g_param_spec_get_nick (_tmp57_);
					_tmp59_ = string_replace (_tmp58_, "::", "");
					attname = _tmp59_;
					val = NULL;
					_tmp60_ = pspec;
					_tmp61_ = _tmp60_->value_type;
					_tmp62_ = g_type_is_a (_tmp61_, GXML_TYPE_GOM_PROPERTY);
					if (_tmp62_) {
						GValue v = {0};
						GParamSpec* _tmp63_ = NULL;
						GType _tmp64_ = 0UL;
						GValue _tmp65_ = {0};
						GXmlDomNode* _tmp66_ = NULL;
						GParamSpec* _tmp67_ = NULL;
						const gchar* _tmp68_ = NULL;
						GXmlGomProperty* gp = NULL;
						GObject* _tmp69_ = NULL;
						GXmlGomProperty* _tmp70_ = NULL;
						GXmlGomProperty* _tmp71_ = NULL;
						GXmlGomProperty* _tmp72_ = NULL;
						gchar* _tmp73_ = NULL;
						gchar* _tmp74_ = NULL;
						_tmp63_ = pspec;
						_tmp64_ = _tmp63_->value_type;
						g_value_init (&_tmp65_, _tmp64_);
						v = _tmp65_;
						_tmp66_ = node;
						_tmp67_ = pspec;
						_tmp68_ = _tmp67_->name;
						g_object_get_property ((GObject*) _tmp66_, _tmp68_, &v);
						_tmp69_ = g_value_get_object (&v);
						_tmp70_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp69_, GXML_TYPE_GOM_PROPERTY) ? ((GXmlGomProperty*) _tmp69_) : NULL);
						gp = _tmp70_;
						_tmp71_ = gp;
						if (_tmp71_ == NULL) {
							_g_object_unref0 (gp);
							G_IS_VALUE (&v) ? (g_value_unset (&v), NULL) : NULL;
							_g_free0 (val);
							_g_free0 (attname);
							_g_param_spec_unref0 (pspec);
							continue;
						}
						_tmp72_ = gp;
						_tmp73_ = gxml_gom_property_get_value (_tmp72_);
						_tmp74_ = _tmp73_;
						_g_free0 (val);
						val = _tmp74_;
						_g_object_unref0 (gp);
						G_IS_VALUE (&v) ? (g_value_unset (&v), NULL) : NULL;
					} else {
						GXmlDomNode* _tmp75_ = NULL;
						GParamSpec* _tmp76_ = NULL;
						gchar* _tmp77_ = NULL;
						_tmp75_ = node;
						_tmp76_ = pspec;
						_tmp77_ = gxml_gom_object_get_property_string (G_TYPE_CHECK_INSTANCE_TYPE (_tmp75_, GXML_TYPE_GOM_OBJECT) ? ((GXmlGomObject*) _tmp75_) : NULL, _tmp76_);
						_g_free0 (val);
						val = _tmp77_;
					}
					_tmp78_ = val;
					if (_tmp78_ == NULL) {
						_g_free0 (val);
						_g_free0 (attname);
						_g_param_spec_unref0 (pspec);
						continue;
					}
					_tmp79_ = size;
					_tmp80_ = self->priv->tw;
					_tmp81_ = attname;
					_tmp82_ = val;
					_tmp83_ = xmlTextWriterWriteAttribute (_tmp80_, (xmlChar*) _tmp81_, (xmlChar*) _tmp82_);
					size = _tmp79_ + _tmp83_;
					_tmp84_ = size;
					_tmp85_ = self->priv->tw;
					_tmp86_ = xmlTextWriterEndAttribute (_tmp85_);
					size = _tmp84_ + _tmp86_;
					_tmp87_ = size;
					if (_tmp87_ > 1500) {
						xmlTextWriter* _tmp88_ = NULL;
						_tmp88_ = self->priv->tw;
						xmlTextWriterFlush (_tmp88_);
					}
					_g_free0 (val);
					_g_free0 (attname);
					_g_param_spec_unref0 (pspec);
				}
			}
		}
		{
			GeeIterator* _ak_it = NULL;
			GXmlDomNode* _tmp89_ = NULL;
			GXmlDomNamedNodeMap* _tmp90_ = NULL;
			GXmlDomNamedNodeMap* _tmp91_ = NULL;
			GXmlDomNamedNodeMap* _tmp92_ = NULL;
			GeeSet* _tmp93_ = NULL;
			GeeSet* _tmp94_ = NULL;
			GeeSet* _tmp95_ = NULL;
			GeeIterator* _tmp96_ = NULL;
			GeeIterator* _tmp97_ = NULL;
			_tmp89_ = node;
			_tmp90_ = gxml_dom_element_get_attributes (G_TYPE_CHECK_INSTANCE_TYPE (_tmp89_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp89_) : NULL);
			_tmp91_ = _tmp90_;
			_tmp92_ = _tmp91_;
			_tmp93_ = gee_map_get_keys ((GeeMap*) _tmp92_);
			_tmp94_ = _tmp93_;
			_tmp95_ = _tmp94_;
			_tmp96_ = gee_iterable_iterator ((GeeIterable*) _tmp95_);
			_tmp97_ = _tmp96_;
			_g_object_unref0 (_tmp95_);
			_g_object_unref0 (_tmp92_);
			_ak_it = _tmp97_;
			while (TRUE) {
				GeeIterator* _tmp98_ = NULL;
				gboolean _tmp99_ = FALSE;
				gchar* ak = NULL;
				GeeIterator* _tmp100_ = NULL;
				gpointer _tmp101_ = NULL;
				gchar* v = NULL;
				GXmlDomNode* _tmp102_ = NULL;
				GXmlDomNamedNodeMap* _tmp103_ = NULL;
				GXmlDomNamedNodeMap* _tmp104_ = NULL;
				GeeHashMap* _tmp105_ = NULL;
				GeeHashMap* _tmp106_ = NULL;
				const gchar* _tmp107_ = NULL;
				gpointer _tmp108_ = NULL;
				gchar* _tmp109_ = NULL;
				const gchar* _tmp110_ = NULL;
				gboolean _tmp111_ = FALSE;
				gint _tmp131_ = 0;
				xmlTextWriter* _tmp132_ = NULL;
				const gchar* _tmp133_ = NULL;
				const gchar* _tmp134_ = NULL;
				gint _tmp135_ = 0;
				gint _tmp136_ = 0;
				xmlTextWriter* _tmp137_ = NULL;
				gint _tmp138_ = 0;
				gint _tmp139_ = 0;
				_tmp98_ = _ak_it;
				_tmp99_ = gee_iterator_next (_tmp98_);
				if (!_tmp99_) {
					break;
				}
				_tmp100_ = _ak_it;
				_tmp101_ = gee_iterator_get (_tmp100_);
				ak = (gchar*) _tmp101_;
				_tmp102_ = node;
				_tmp103_ = gxml_dom_element_get_attributes (G_TYPE_CHECK_INSTANCE_TYPE (_tmp102_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp102_) : NULL);
				_tmp104_ = _tmp103_;
				_tmp105_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp104_, GEE_TYPE_HASH_MAP) ? ((GeeHashMap*) _tmp104_) : NULL;
				if (_tmp105_ == NULL) {
					_g_object_unref0 (_tmp104_);
				}
				_tmp106_ = _tmp105_;
				_tmp107_ = ak;
				_tmp108_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp106_, _tmp107_);
				_tmp109_ = (gchar*) _tmp108_;
				_g_object_unref0 (_tmp106_);
				v = _tmp109_;
				_tmp110_ = ak;
				_tmp111_ = string_contains (_tmp110_, "xmlns:");
				if (_tmp111_) {
					gchar* ns = NULL;
					GXmlDomNode* _tmp112_ = NULL;
					gchar* _tmp113_ = NULL;
					gchar* _tmp114_ = NULL;
					const gchar* _tmp115_ = NULL;
					_tmp112_ = node;
					_tmp113_ = gxml_dom_element_get_namespace_uri (G_TYPE_CHECK_INSTANCE_TYPE (_tmp112_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp112_) : NULL);
					_tmp114_ = _tmp113_;
					ns = _tmp114_;
					_tmp115_ = ns;
					if (_tmp115_ != NULL) {
						gchar** strs = NULL;
						const gchar* _tmp116_ = NULL;
						gchar** _tmp117_ = NULL;
						gchar** _tmp118_ = NULL;
						gint strs_length1 = 0;
						gint _strs_size_ = 0;
						gchar** _tmp119_ = NULL;
						gint _tmp119__length1 = 0;
						_tmp116_ = ak;
						_tmp118_ = _tmp117_ = g_strsplit (_tmp116_, ":", 0);
						strs = _tmp118_;
						strs_length1 = _vala_array_length (_tmp117_);
						_strs_size_ = strs_length1;
						_tmp119_ = strs;
						_tmp119__length1 = strs_length1;
						if (_tmp119__length1 == 2) {
							gchar* nsp = NULL;
							gchar** _tmp120_ = NULL;
							gint _tmp120__length1 = 0;
							const gchar* _tmp121_ = NULL;
							gchar* _tmp122_ = NULL;
							gboolean _tmp123_ = FALSE;
							const gchar* _tmp124_ = NULL;
							const gchar* _tmp125_ = NULL;
							_tmp120_ = strs;
							_tmp120__length1 = strs_length1;
							_tmp121_ = _tmp120_[1];
							_tmp122_ = g_strdup (_tmp121_);
							nsp = _tmp122_;
							_tmp124_ = ns;
							_tmp125_ = v;
							if (g_strcmp0 (_tmp124_, _tmp125_) == 0) {
								const gchar* _tmp126_ = NULL;
								GXmlDomNode* _tmp127_ = NULL;
								gchar* _tmp128_ = NULL;
								gchar* _tmp129_ = NULL;
								gchar* _tmp130_ = NULL;
								_tmp126_ = nsp;
								_tmp127_ = node;
								_tmp128_ = gxml_dom_element_get_prefix (G_TYPE_CHECK_INSTANCE_TYPE (_tmp127_, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _tmp127_) : NULL);
								_tmp129_ = _tmp128_;
								_tmp130_ = _tmp129_;
								_tmp123_ = g_strcmp0 (_tmp126_, _tmp130_) == 0;
								_g_free0 (_tmp130_);
							} else {
								_tmp123_ = FALSE;
							}
							if (_tmp123_) {
								_g_free0 (nsp);
								strs = (_vala_array_free (strs, strs_length1, (GDestroyNotify) g_free), NULL);
								_g_free0 (ns);
								_g_free0 (v);
								_g_free0 (ak);
								continue;
							}
							_g_free0 (nsp);
						}
						strs = (_vala_array_free (strs, strs_length1, (GDestroyNotify) g_free), NULL);
					}
					_g_free0 (ns);
				}
				_tmp131_ = size;
				_tmp132_ = self->priv->tw;
				_tmp133_ = ak;
				_tmp134_ = v;
				_tmp135_ = xmlTextWriterWriteAttribute (_tmp132_, (xmlChar*) _tmp133_, (xmlChar*) _tmp134_);
				size = _tmp131_ + _tmp135_;
				_tmp136_ = size;
				_tmp137_ = self->priv->tw;
				_tmp138_ = xmlTextWriterEndAttribute (_tmp137_);
				size = _tmp136_ + _tmp138_;
				_tmp139_ = size;
				if (_tmp139_ > 1500) {
					xmlTextWriter* _tmp140_ = NULL;
					_tmp140_ = self->priv->tw;
					xmlTextWriterFlush (_tmp140_);
				}
				_g_free0 (v);
				_g_free0 (ak);
			}
			_g_object_unref0 (_ak_it);
		}
		__g_list_free__g_param_spec_unref0_0 (lp);
	}
	{
		GXmlDomNodeList* _n_list = NULL;
		GXmlDomNode* _tmp141_ = NULL;
		GXmlDomNodeList* _tmp142_ = NULL;
		GXmlDomNodeList* _tmp143_ = NULL;
		gint _n_size = 0;
		GXmlDomNodeList* _tmp144_ = NULL;
		gint _tmp145_ = 0;
		gint _tmp146_ = 0;
		gint _n_index = 0;
		_tmp141_ = node;
		_tmp142_ = gxml_dom_node_get_child_nodes (_tmp141_);
		_tmp143_ = _tmp142_;
		_n_list = _tmp143_;
		_tmp144_ = _n_list;
		_tmp145_ = gee_collection_get_size ((GeeCollection*) _tmp144_);
		_tmp146_ = _tmp145_;
		_n_size = _tmp146_;
		_n_index = -1;
		while (TRUE) {
			gint _tmp147_ = 0;
			gint _tmp148_ = 0;
			gint _tmp149_ = 0;
			GXmlDomNode* n = NULL;
			GXmlDomNodeList* _tmp150_ = NULL;
			gint _tmp151_ = 0;
			gpointer _tmp152_ = NULL;
			GXmlDomNode* _tmp153_ = NULL;
			GXmlDomNode* _tmp160_ = NULL;
			GXmlDomNode* _tmp170_ = NULL;
			GXmlDomNode* _tmp180_ = NULL;
			_tmp147_ = _n_index;
			_n_index = _tmp147_ + 1;
			_tmp148_ = _n_index;
			_tmp149_ = _n_size;
			if (!(_tmp148_ < _tmp149_)) {
				break;
			}
			_tmp150_ = _n_list;
			_tmp151_ = _n_index;
			_tmp152_ = gee_list_get ((GeeList*) _tmp150_, _tmp151_);
			n = (GXmlDomNode*) _tmp152_;
			_tmp153_ = n;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp153_, GXML_TYPE_DOM_ELEMENT)) {
				GXmlDomNode* _tmp154_ = NULL;
				gint _tmp155_ = 0;
				xmlTextWriter* _tmp156_ = NULL;
				gint _tmp157_ = 0;
				gint _tmp158_ = 0;
				_tmp154_ = n;
				gxml_xparser_start_node (self, _tmp154_, &_inner_error_);
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					g_propagate_error (error, _inner_error_);
					_g_object_unref0 (n);
					_g_object_unref0 (_n_list);
					return;
				}
				_tmp155_ = size;
				_tmp156_ = self->priv->tw;
				_tmp157_ = xmlTextWriterEndElement (_tmp156_);
				size = _tmp155_ + _tmp157_;
				_tmp158_ = size;
				if (_tmp158_ > 1500) {
					xmlTextWriter* _tmp159_ = NULL;
					_tmp159_ = self->priv->tw;
					xmlTextWriterFlush (_tmp159_);
				}
			}
			_tmp160_ = n;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp160_, GXML_TYPE_DOM_TEXT)) {
				gint _tmp161_ = 0;
				xmlTextWriter* _tmp162_ = NULL;
				GXmlDomNode* _tmp163_ = NULL;
				gchar* _tmp164_ = NULL;
				gchar* _tmp165_ = NULL;
				gchar* _tmp166_ = NULL;
				gint _tmp167_ = 0;
				gint _tmp168_ = 0;
				_tmp161_ = size;
				_tmp162_ = self->priv->tw;
				_tmp163_ = n;
				_tmp164_ = gxml_dom_node_get_node_value (_tmp163_);
				_tmp165_ = _tmp164_;
				_tmp166_ = _tmp165_;
				_tmp167_ = xmlTextWriterWriteString (_tmp162_, (xmlChar*) _tmp166_);
				size = _tmp161_ + _tmp167_;
				_g_free0 (_tmp166_);
				_tmp168_ = size;
				if (_tmp168_ > 1500) {
					xmlTextWriter* _tmp169_ = NULL;
					_tmp169_ = self->priv->tw;
					xmlTextWriterFlush (_tmp169_);
				}
			}
			_tmp170_ = n;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp170_, GXML_TYPE_DOM_COMMENT)) {
				gint _tmp171_ = 0;
				xmlTextWriter* _tmp172_ = NULL;
				GXmlDomNode* _tmp173_ = NULL;
				gchar* _tmp174_ = NULL;
				gchar* _tmp175_ = NULL;
				gchar* _tmp176_ = NULL;
				gint _tmp177_ = 0;
				gint _tmp178_ = 0;
				_tmp171_ = size;
				_tmp172_ = self->priv->tw;
				_tmp173_ = n;
				_tmp174_ = gxml_dom_node_get_node_value (_tmp173_);
				_tmp175_ = _tmp174_;
				_tmp176_ = _tmp175_;
				_tmp177_ = xmlTextWriterWriteComment (_tmp172_, (xmlChar*) _tmp176_);
				size = _tmp171_ + _tmp177_;
				_g_free0 (_tmp176_);
				_tmp178_ = size;
				if (_tmp178_ > 1500) {
					xmlTextWriter* _tmp179_ = NULL;
					_tmp179_ = self->priv->tw;
					xmlTextWriterFlush (_tmp179_);
				}
			}
			_tmp180_ = n;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp180_, GXML_TYPE_DOM_PROCESSING_INSTRUCTION)) {
				gint _tmp181_ = 0;
				xmlTextWriter* _tmp182_ = NULL;
				GXmlDomNode* _tmp183_ = NULL;
				gchar* _tmp184_ = NULL;
				gchar* _tmp185_ = NULL;
				gchar* _tmp186_ = NULL;
				GXmlDomNode* _tmp187_ = NULL;
				gchar* _tmp188_ = NULL;
				gchar* _tmp189_ = NULL;
				gchar* _tmp190_ = NULL;
				gint _tmp191_ = 0;
				gint _tmp192_ = 0;
				_tmp181_ = size;
				_tmp182_ = self->priv->tw;
				_tmp183_ = n;
				_tmp184_ = gxml_dom_processing_instruction_get_target (G_TYPE_CHECK_INSTANCE_TYPE (_tmp183_, GXML_TYPE_DOM_PROCESSING_INSTRUCTION) ? ((GXmlDomProcessingInstruction*) _tmp183_) : NULL);
				_tmp185_ = _tmp184_;
				_tmp186_ = _tmp185_;
				_tmp187_ = n;
				_tmp188_ = gxml_dom_character_data_get_data ((GXmlDomCharacterData*) (G_TYPE_CHECK_INSTANCE_TYPE (_tmp187_, GXML_TYPE_DOM_PROCESSING_INSTRUCTION) ? ((GXmlDomProcessingInstruction*) _tmp187_) : NULL));
				_tmp189_ = _tmp188_;
				_tmp190_ = _tmp189_;
				_tmp191_ = xmlTextWriterWritePI (_tmp182_, (xmlChar*) _tmp186_, (xmlChar*) _tmp190_);
				size = _tmp181_ + _tmp191_;
				_g_free0 (_tmp190_);
				_g_free0 (_tmp186_);
				_tmp192_ = size;
				if (_tmp192_ > 1500) {
					xmlTextWriter* _tmp193_ = NULL;
					_tmp193_ = self->priv->tw;
					xmlTextWriterFlush (_tmp193_);
				}
			}
			_g_object_unref0 (n);
		}
		_g_object_unref0 (_n_list);
	}
}


static gboolean gxml_xparser_real_get_backup (GXmlParser* base) {
	gboolean result;
	GXmlXParser* self;
	gboolean _tmp0_ = FALSE;
	self = (GXmlXParser*) base;
	_tmp0_ = self->priv->_backup;
	result = _tmp0_;
	return result;
}


static void gxml_xparser_real_set_backup (GXmlParser* base, gboolean value) {
	GXmlXParser* self;
	gboolean _tmp0_ = FALSE;
	self = (GXmlXParser*) base;
	_tmp0_ = value;
	self->priv->_backup = _tmp0_;
	g_object_notify ((GObject *) self, "backup");
}


static gboolean gxml_xparser_real_get_indent (GXmlParser* base) {
	gboolean result;
	GXmlXParser* self;
	gboolean _tmp0_ = FALSE;
	self = (GXmlXParser*) base;
	_tmp0_ = self->priv->_indent;
	result = _tmp0_;
	return result;
}


static void gxml_xparser_real_set_indent (GXmlParser* base, gboolean value) {
	GXmlXParser* self;
	gboolean _tmp0_ = FALSE;
	self = (GXmlXParser*) base;
	_tmp0_ = value;
	self->priv->_indent = _tmp0_;
	g_object_notify ((GObject *) self, "indent");
}


static GXmlDomNode* gxml_xparser_real_get_node (GXmlParser* base) {
	GXmlDomNode* result;
	GXmlXParser* self;
	GXmlDomNode* _tmp0_ = NULL;
	self = (GXmlXParser*) base;
	_tmp0_ = self->priv->_node;
	result = _tmp0_;
	return result;
}


static GObject * gxml_xparser_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	GXmlXParser * self;
	parent_class = G_OBJECT_CLASS (gxml_xparser_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_XPARSER, GXmlXParser);
	gxml_parser_set_backup ((GXmlParser*) self, TRUE);
	gxml_parser_set_indent ((GXmlParser*) self, FALSE);
	return obj;
}


static void gxml_xparser_class_init (GXmlXParserClass * klass) {
	gxml_xparser_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GXmlXParserPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_xparser_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gxml_xparser_set_property;
	G_OBJECT_CLASS (klass)->constructor = gxml_xparser_constructor;
	G_OBJECT_CLASS (klass)->finalize = gxml_xparser_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_XPARSER_BACKUP, g_param_spec_boolean ("backup", "backup", "backup", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_XPARSER_INDENT, g_param_spec_boolean ("indent", "indent", "indent", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_XPARSER_NODE, g_param_spec_object ("node", "node", "node", GXML_TYPE_DOM_NODE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void gxml_xparser_gxml_parser_interface_init (GXmlParserIface * iface) {
	gxml_xparser_gxml_parser_parent_iface = g_type_interface_peek_parent (iface);
	iface->write_stream = (void (*)(GXmlParser*, GOutputStream*, GCancellable*, GError**)) gxml_xparser_real_write_stream;
	iface->write_string = (gchar* (*)(GXmlParser*, GError**)) gxml_xparser_real_write_string;
	iface->read_string = (void (*)(GXmlParser*, const gchar*, GCancellable*, GError**)) gxml_xparser_real_read_string;
	iface->read_stream = (void (*)(GXmlParser*, GInputStream*, GCancellable*, GError**)) gxml_xparser_real_read_stream;
	iface->get_backup = gxml_xparser_real_get_backup;
	iface->set_backup = gxml_xparser_real_set_backup;
	iface->get_indent = gxml_xparser_real_get_indent;
	iface->set_indent = gxml_xparser_real_set_indent;
	iface->get_node = gxml_xparser_real_get_node;
}


static void gxml_xparser_instance_init (GXmlXParser * self) {
	self->priv = GXML_XPARSER_GET_PRIVATE (self);
}


static void gxml_xparser_finalize (GObject* obj) {
	GXmlXParser * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_XPARSER, GXmlXParser);
	_g_object_unref0 (self->priv->_document);
	_g_object_unref0 (self->priv->_node);
	_xmlFreeTextReader0 (self->priv->tr);
	_xmlFreeTextWriter0 (self->priv->tw);
	G_OBJECT_CLASS (gxml_xparser_parent_class)->finalize (obj);
}


/**
 * {@link Parser} implementation using libxml2 engine
 */
GType gxml_xparser_get_type (void) {
	static volatile gsize gxml_xparser_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_xparser_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlXParserClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_xparser_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlXParser), 0, (GInstanceInitFunc) gxml_xparser_instance_init, NULL };
		static const GInterfaceInfo gxml_parser_info = { (GInterfaceInitFunc) gxml_xparser_gxml_parser_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType gxml_xparser_type_id;
		gxml_xparser_type_id = g_type_register_static (G_TYPE_OBJECT, "GXmlXParser", &g_define_type_info, 0);
		g_type_add_interface_static (gxml_xparser_type_id, GXML_TYPE_PARSER, &gxml_parser_info);
		g_once_init_leave (&gxml_xparser_type_id__volatile, gxml_xparser_type_id);
	}
	return gxml_xparser_type_id__volatile;
}


static void _vala_gxml_xparser_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GXmlXParser * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_XPARSER, GXmlXParser);
	switch (property_id) {
		case GXML_XPARSER_BACKUP:
		g_value_set_boolean (value, gxml_parser_get_backup ((GXmlParser*) self));
		break;
		case GXML_XPARSER_INDENT:
		g_value_set_boolean (value, gxml_parser_get_indent ((GXmlParser*) self));
		break;
		case GXML_XPARSER_NODE:
		g_value_set_object (value, gxml_parser_get_node ((GXmlParser*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_gxml_xparser_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GXmlXParser * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_XPARSER, GXmlXParser);
	switch (property_id) {
		case GXML_XPARSER_BACKUP:
		gxml_parser_set_backup ((GXmlParser*) self, g_value_get_boolean (value));
		break;
		case GXML_XPARSER_INDENT:
		gxml_parser_set_indent ((GXmlParser*) self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}


static gint _vala_array_length (gpointer array) {
	int length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}



