/* XParser.c generated by valac 0.44.3, 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-2019  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-object.h>
#include <gio/gio.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <libxml/xmlreader.h>
#include <libxml/xmlwriter.h>
#include <glib/gi18n-lib.h>
#include <libxml/parser.h>
#include <libxml/tree.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_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_TYPE_DOM_EVENT_TARGET (gxml_dom_event_target_get_type ())
#define GXML_DOM_EVENT_TARGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_EVENT_TARGET, GXmlDomEventTarget))
#define GXML_IS_DOM_EVENT_TARGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_EVENT_TARGET))
#define GXML_DOM_EVENT_TARGET_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_EVENT_TARGET, GXmlDomEventTargetIface))

typedef struct _GXmlDomEventTarget GXmlDomEventTarget;
typedef struct _GXmlDomEventTargetIface GXmlDomEventTargetIface;

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

typedef struct _GXmlDomEventListener GXmlDomEventListener;
typedef struct _GXmlDomEventListenerIface GXmlDomEventListenerIface;

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

typedef struct _GXmlDomEvent GXmlDomEvent;
typedef struct _GXmlDomEventIface GXmlDomEventIface;

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

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

#define GXML_DOM_EVENT_TYPE_PHASE (gxml_dom_event_phase_get_type ())
typedef enum  {
	GXML_DOM_NODE_DOCUMENT_POSITION_NONE = 1 << 0,
	GXML_DOM_NODE_DOCUMENT_POSITION_DISCONNECTED = 1 << 1,
	GXML_DOM_NODE_DOCUMENT_POSITION_PRECEDING = 1 << 2,
	GXML_DOM_NODE_DOCUMENT_POSITION_FOLLOWING = 1 << 3,
	GXML_DOM_NODE_DOCUMENT_POSITION_CONTAINS = 1 << 4,
	GXML_DOM_NODE_DOCUMENT_POSITION_CONTAINED_BY = 1 << 5,
	GXML_DOM_NODE_DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 1 << 6
} GXmlDomNodeDocumentPosition;

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

#define GXML_DOM_NODE_TYPE_NODE_TYPE (gxml_dom_node_node_type_get_type ())

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

typedef struct _GXmlDomDocument GXmlDomDocument;
typedef struct _GXmlDomDocumentIface GXmlDomDocumentIface;

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

typedef struct _GXmlDomParentNode GXmlDomParentNode;
typedef struct _GXmlDomParentNodeIface GXmlDomParentNodeIface;

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

typedef struct _GXmlDomElement GXmlDomElement;
typedef struct _GXmlDomElementIface GXmlDomElementIface;

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

typedef struct _GXmlDomChildNode GXmlDomChildNode;
typedef struct _GXmlDomChildNodeIface GXmlDomChildNodeIface;

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

typedef struct _GXmlDomNonDocumentTypeChildNode GXmlDomNonDocumentTypeChildNode;
typedef struct _GXmlDomNonDocumentTypeChildNodeIface GXmlDomNonDocumentTypeChildNodeIface;

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

typedef struct _GXmlDomHTMLCollection GXmlDomHTMLCollection;
typedef struct _GXmlDomHTMLCollectionIface GXmlDomHTMLCollectionIface;

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

typedef struct _GXmlDomTokenList GXmlDomTokenList;
typedef struct _GXmlDomTokenListIface GXmlDomTokenListIface;

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

typedef struct _GXmlDomNamedNodeMap GXmlDomNamedNodeMap;
typedef struct _GXmlDomNamedNodeMapIface GXmlDomNamedNodeMapIface;

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

typedef struct _GXmlDomNodeList GXmlDomNodeList;
typedef struct _GXmlDomNodeListIface GXmlDomNodeListIface;

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

typedef struct _GXmlDomElementList GXmlDomElementList;
typedef struct _GXmlDomElementListClass GXmlDomElementListClass;

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

typedef struct _GXmlDomNonElementParentNode GXmlDomNonElementParentNode;
typedef struct _GXmlDomNonElementParentNodeIface GXmlDomNonElementParentNodeIface;

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

typedef struct _GXmlDomDocumentFragment GXmlDomDocumentFragment;
typedef struct _GXmlDomDocumentFragmentIface GXmlDomDocumentFragmentIface;

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

typedef struct _GXmlDomText GXmlDomText;
typedef struct _GXmlDomTextIface GXmlDomTextIface;

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

typedef struct _GXmlDomCharacterData GXmlDomCharacterData;
typedef struct _GXmlDomCharacterDataIface GXmlDomCharacterDataIface;

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

typedef struct _GXmlDomComment GXmlDomComment;
typedef struct _GXmlDomCommentIface GXmlDomCommentIface;

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

typedef struct _GXmlDomProcessingInstruction GXmlDomProcessingInstruction;
typedef struct _GXmlDomProcessingInstructionIface GXmlDomProcessingInstructionIface;

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

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

#define GXML_DOM_RANGE_TYPE_BOUNDARY_POINTS (gxml_dom_range_boundary_points_get_type ())

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

typedef struct _GXmlDomNodeFilter GXmlDomNodeFilter;
typedef struct _GXmlDomNodeFilterClass GXmlDomNodeFilterClass;

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

typedef struct _GXmlDomNodeIterator GXmlDomNodeIterator;
typedef struct _GXmlDomNodeIteratorIface GXmlDomNodeIteratorIface;

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

typedef struct _GXmlDomTreeWalker GXmlDomTreeWalker;
typedef struct _GXmlDomTreeWalkerIface GXmlDomTreeWalkerIface;

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

typedef struct _GXmlDomImplementation GXmlDomImplementation;
typedef struct _GXmlDomImplementationIface GXmlDomImplementationIface;

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

typedef struct _GXmlDomDocumentType GXmlDomDocumentType;
typedef struct _GXmlDomDocumentTypeIface GXmlDomDocumentTypeIface;

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

typedef struct _GXmlDomXMLDocument GXmlDomXMLDocument;
typedef struct _GXmlDomXMLDocumentIface GXmlDomXMLDocumentIface;

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

typedef struct _GXmlDocument GXmlDocument;
typedef struct _GXmlDocumentIface GXmlDocumentIface;

#define GXML_TYPE_NODE (gxml_node_get_type ())
#define GXML_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_NODE, GXmlNode))
#define GXML_IS_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_NODE))
#define GXML_NODE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_NODE, GXmlNodeIface))

typedef struct _GXmlNode GXmlNode;
typedef struct _GXmlNodeIface GXmlNodeIface;

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

typedef struct _GXmlElementList GXmlElementList;
typedef struct _GXmlElementListClass GXmlElementListClass;

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

typedef struct _GXmlNamespace GXmlNamespace;
typedef struct _GXmlNamespaceIface GXmlNamespaceIface;
typedef enum  {
	GXML_NODE_TYPE_INVALID = 0,
	GXML_NODE_TYPE_ELEMENT = 1,
	GXML_NODE_TYPE_ATTRIBUTE,
	GXML_NODE_TYPE_TEXT,
	GXML_NODE_TYPE_CDATA_SECTION,
	GXML_NODE_TYPE_ENTITY_REFERENCE,
	GXML_NODE_TYPE_ENTITY,
	GXML_NODE_TYPE_PROCESSING_INSTRUCTION,
	GXML_NODE_TYPE_COMMENT,
	GXML_NODE_TYPE_DOCUMENT,
	GXML_NODE_TYPE_DOCUMENT_TYPE,
	GXML_NODE_TYPE_DOCUMENT_FRAGMENT,
	GXML_NODE_TYPE_NOTATION
} GXmlNodeType;

#define GXML_TYPE_NODE_TYPE (gxml_node_type_get_type ())

#define GXML_TYPE_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;
enum  {
	GXML_XPARSER_0_PROPERTY,
	GXML_XPARSER_BACKUP_PROPERTY,
	GXML_XPARSER_INDENT_PROPERTY,
	GXML_XPARSER_NODE_PROPERTY,
	GXML_XPARSER_CANCELLABLE_PROPERTY,
	GXML_XPARSER_NUM_PROPERTIES
};
static GParamSpec* gxml_xparser_properties[GXML_XPARSER_NUM_PROPERTIES];
#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 _g_free0(var) (var = (g_free (var), NULL))
typedef struct _GxmlXparserWriteStreamAsyncData GxmlXparserWriteStreamAsyncData;
typedef struct _GxmlXparserCreateStreamAsyncData GxmlXparserCreateStreamAsyncData;
typedef struct _GxmlXparserWriteStringAsyncData GxmlXparserWriteStringAsyncData;
typedef struct _GxmlXparserReadStringAsyncData GxmlXparserReadStringAsyncData;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _GxmlXparserReadStreamAsyncData GxmlXparserReadStreamAsyncData;

#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_DOCUMENT (gxml_gom_document_get_type ())
#define GXML_GOM_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GOM_DOCUMENT, GXmlGomDocument))
#define GXML_GOM_DOCUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GOM_DOCUMENT, GXmlGomDocumentClass))
#define GXML_IS_GOM_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GOM_DOCUMENT))
#define GXML_IS_GOM_DOCUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GOM_DOCUMENT))
#define GXML_GOM_DOCUMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GOM_DOCUMENT, GXmlGomDocumentClass))

typedef struct _GXmlGomDocument GXmlGomDocument;
typedef struct _GXmlGomDocumentClass GXmlGomDocumentClass;

#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;
typedef struct _GxmlXparserReadChildNodesStreamAsyncData GxmlXparserReadChildNodesStreamAsyncData;

#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_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;
#define _xmlBufferFree0(var) ((var == NULL) ? NULL : (var = (xmlBufferFree (var), NULL)))
#define _g_match_info_unref0(var) ((var == NULL) ? NULL : (var = (g_match_info_unref (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))

#define GXML_TYPE_GOM_DOCUMENT_TYPE (gxml_gom_document_type_get_type ())
#define GXML_GOM_DOCUMENT_TYPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GOM_DOCUMENT_TYPE, GXmlGomDocumentType))
#define GXML_GOM_DOCUMENT_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GOM_DOCUMENT_TYPE, GXmlGomDocumentTypeClass))
#define GXML_IS_GOM_DOCUMENT_TYPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GOM_DOCUMENT_TYPE))
#define GXML_IS_GOM_DOCUMENT_TYPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GOM_DOCUMENT_TYPE))
#define GXML_GOM_DOCUMENT_TYPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GOM_DOCUMENT_TYPE, GXmlGomDocumentTypeClass))

typedef struct _GXmlGomDocumentType GXmlGomDocumentType;
typedef struct _GXmlGomDocumentTypeClass GXmlGomDocumentTypeClass;
#define _xmlFreeDoc0(var) ((var == NULL) ? NULL : (var = (xmlFreeDoc (var), NULL)))
#define _g_param_spec_unref0(var) ((var == NULL) ? NULL : (var = (g_param_spec_unref (var), NULL)))

#define GXML_TYPE_GOM_ATTR (gxml_gom_attr_get_type ())
#define GXML_GOM_ATTR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GOM_ATTR, GXmlGomAttr))
#define GXML_GOM_ATTR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GOM_ATTR, GXmlGomAttrClass))
#define GXML_IS_GOM_ATTR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GOM_ATTR))
#define GXML_IS_GOM_ATTR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GOM_ATTR))
#define GXML_GOM_ATTR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GOM_ATTR, GXmlGomAttrClass))

typedef struct _GXmlGomAttr GXmlGomAttr;
typedef struct _GXmlGomAttrClass GXmlGomAttrClass;

#define GXML_TYPE_DOM_ATTR (gxml_dom_attr_get_type ())
#define GXML_DOM_ATTR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_ATTR, GXmlDomAttr))
#define GXML_IS_DOM_ATTR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_ATTR))
#define GXML_DOM_ATTR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_ATTR, GXmlDomAttrIface))

typedef struct _GXmlDomAttr GXmlDomAttr;
typedef struct _GXmlDomAttrIface GXmlDomAttrIface;
typedef struct _GxmlXparserDumpAsyncData GxmlXparserDumpAsyncData;
typedef struct _GxmlXparserStartNodeAsyncData GxmlXparserStartNodeAsyncData;

struct _GXmlDomEventIface {
	GTypeInterface parent_iface;
	void (*stop_propagation) (GXmlDomEvent* self);
	void (*stop_immediate_propagation) (GXmlDomEvent* self);
	void (*prevent_default) (GXmlDomEvent* self);
	void (*init_event) (GXmlDomEvent* self, const gchar* type, gboolean bubbles, gboolean cancelable);
	const gchar* (*get_etype) (GXmlDomEvent* self);
	GXmlDomEventTarget* (*get_event_target) (GXmlDomEvent* self);
	GXmlDomEventTarget* (*get_current_target) (GXmlDomEvent* self);
	gboolean (*get_bubbles) (GXmlDomEvent* self);
	gboolean (*get_cancelable) (GXmlDomEvent* self);
	gboolean (*get_is_trusted) (GXmlDomEvent* self);
	GXmlDomTimeStamp* (*get_time_stamp) (GXmlDomEvent* self);
	gboolean (*get_default_prevented) (GXmlDomEvent* self);
	GXmlDomEventPhase (*get_event_phase) (GXmlDomEvent* self);
};

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

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

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

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

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

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

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

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

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

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

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

struct _GXmlDomDocumentFragmentIface {
	GTypeInterface parent_iface;
};

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

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

struct _GXmlDomCommentIface {
	GTypeInterface parent_iface;
};

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

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

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

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

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

struct _GXmlDomXMLDocumentIface {
	GTypeInterface parent_iface;
};

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

struct _GXmlNodeIface {
	GTypeInterface parent_iface;
	GXmlNode* (*get) (GXmlNode* self, const gchar* key);
	GXmlElementList* (*get_elements_by_property_value) (GXmlNode* self, const gchar* property, const gchar* value);
	GXmlElementList* (*get_elements_by_name) (GXmlNode* self, const gchar* name);
	GXmlElementList* (*get_elements_by_name_ns) (GXmlNode* self, const gchar* name, const gchar* ns);
	gchar* (*to_string) (GXmlNode* self);
	gboolean (*set_namespace) (GXmlNode* self, const gchar* uri, const gchar* prefix);
	gchar* (*ns_prefix) (GXmlNode* self);
	gchar* (*ns_uri) (GXmlNode* self);
	GeeList* (*get_namespaces) (GXmlNode* self);
	GeeBidirList* (*get_children_nodes) (GXmlNode* self);
	GeeMap* (*get_attrs) (GXmlNode* self);
	gchar* (*get_name) (GXmlNode* self);
	gchar* (*get_value) (GXmlNode* self);
	void (*set_value) (GXmlNode* self, const gchar* value);
	GXmlNodeType (*get_type_node) (GXmlNode* self);
	GXmlDocument* (*get_document) (GXmlNode* self);
	GXmlNode* (*get_parent) (GXmlNode* self);
};

struct _GXmlDocumentIface {
	GTypeInterface parent_iface;
	GXmlNode* (*create_element) (GXmlDocument* self, const gchar* name, GError** error);
	GXmlNode* (*create_text) (GXmlDocument* self, const gchar* text);
	GXmlNode* (*create_comment) (GXmlDocument* self, const gchar* text);
	GXmlNode* (*create_cdata) (GXmlDocument* self, const gchar* text);
	GXmlNode* (*create_pi) (GXmlDocument* self, const gchar* target, const gchar* data);
	gboolean (*save) (GXmlDocument* self, GCancellable* cancellable, GError** error);
	gboolean (*save_as) (GXmlDocument* self, GFile* f, GCancellable* cancellable, GError** error);
	gboolean (*get_indent) (GXmlDocument* self);
	void (*set_indent) (GXmlDocument* self, gboolean value);
	gboolean (*get_ns_top) (GXmlDocument* self);
	void (*set_ns_top) (GXmlDocument* self, gboolean value);
	gboolean (*get_prefix_default_ns) (GXmlDocument* self);
	void (*set_prefix_default_ns) (GXmlDocument* self, gboolean value);
	gboolean (*get_backup) (GXmlDocument* self);
	void (*set_backup) (GXmlDocument* self, gboolean value);
	GXmlNode* (*get_root) (GXmlDocument* self);
	GFile* (*get_file) (GXmlDocument* self);
	void (*set_file) (GXmlDocument* self, GFile* value);
};

struct _GXmlDomImplementationIface {
	GTypeInterface parent_iface;
	GXmlDomDocumentType* (*create_document_type) (GXmlDomImplementation* self, const gchar* qualified_name, const gchar* public_id, const gchar* system_id, GError** error);
	GXmlDomXMLDocument* (*create_document) (GXmlDomImplementation* self, const gchar* nspace, const gchar* qualified_name, GXmlDomDocumentType* doctype, GError** error);
	GXmlDocument* (*create_html_document) (GXmlDomImplementation* self, const gchar* title);
	gboolean (*has_feature) (GXmlDomImplementation* self);
};

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

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

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

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

struct _GXmlXParserClass {
	GObjectClass parent_class;
};

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

struct _GxmlXparserWriteStreamAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GAsyncReadyCallback _callback_;
	gboolean _task_complete_;
	GXmlXParser* self;
	GOutputStream* stream;
	gchar* s;
	gchar* _tmp0_;
	GMemoryInputStream* b;
	const gchar* _tmp1_;
	guint8* _tmp2_;
	gint _tmp2__length1;
	guint8* _tmp3_;
	gint _tmp3__length1;
	guint8* _tmp4_;
	gint _tmp4__length1;
	GMemoryInputStream* _tmp5_;
	GMemoryInputStream* _tmp6_;
	GCancellable* _tmp7_;
	GCancellable* _tmp8_;
	GError* _inner_error0_;
};

struct _GxmlXparserCreateStreamAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GAsyncReadyCallback _callback_;
	gboolean _task_complete_;
	GXmlXParser* self;
	GInputStream* result;
	gchar* s;
	gchar* _tmp0_;
	guint8* _tmp1_;
	gint _tmp1__length1;
	guint8* _tmp2_;
	gint _tmp2__length1;
	guint8* _tmp3_;
	gint _tmp3__length1;
	GMemoryInputStream* _tmp4_;
	GError* _inner_error0_;
};

struct _GxmlXparserWriteStringAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GAsyncReadyCallback _callback_;
	gboolean _task_complete_;
	GXmlXParser* self;
	gchar* result;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	GError* _inner_error0_;
};

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 ()
struct _GxmlXparserReadStringAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GAsyncReadyCallback _callback_;
	gboolean _task_complete_;
	GXmlXParser* self;
	gchar* str;
	GError* _tmp0_;
	GMemoryInputStream* stream;
	guint8* _tmp1_;
	gint _tmp1__length1;
	guint8* _tmp2_;
	gint _tmp2__length1;
	guint8* _tmp3_;
	gint _tmp3__length1;
	GDestroyNotify _tmp4_;
	GMemoryInputStream* _tmp5_;
	GError* _inner_error0_;
};

struct _GxmlXparserReadStreamAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GAsyncReadyCallback _callback_;
	gboolean _task_complete_;
	GXmlXParser* self;
	GInputStream* istream;
	GCancellable* _tmp0_;
	GCancellable* _tmp1_;
	GDataInputStream* _tmp2_;
	xmlTextReader* _tmp3_;
	GXmlDomNode* _tmp4_;
	GXmlDomNode* _tmp5_;
	GXmlDomNode* _tmp6_;
	GError* _inner_error0_;
};

struct _GxmlXparserReadChildNodesStreamAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GAsyncReadyCallback _callback_;
	gboolean _task_complete_;
	GXmlXParser* self;
	GInputStream* istream;
	GMemoryOutputStream* b;
	GMemoryOutputStream* _tmp0_;
	GMemoryOutputStream* _tmp1_;
	GMemoryOutputStream* _tmp2_;
	void* _tmp3_;
	void* _tmp4_;
	GMemoryOutputStream* _tmp5_;
	xmlTextReader* _tmp6_;
	GXmlDomNode* _tmp7_;
	GError* _inner_error0_;
};

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

struct _GXmlGomObjectIface {
	GTypeInterface parent_iface;
	GList* (*get_properties_list) (GXmlGomObject* self);
	GParamSpec* (*find_property_name) (GXmlGomObject* self, const gchar* nick);
	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);
	GXmlGomProperty* (*find_property) (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 _GXmlDomAttrIface {
	GTypeInterface parent_iface;
	gchar* (*get_namespace_uri) (GXmlDomAttr* self);
	gchar* (*get_prefix) (GXmlDomAttr* self);
	gchar* (*get_local_name) (GXmlDomAttr* self);
	gchar* (*get_name) (GXmlDomAttr* self);
	gchar* (*get_value) (GXmlDomAttr* self);
	void (*set_value) (GXmlDomAttr* self, const gchar* value);
	gboolean (*get_specified) (GXmlDomAttr* self);
};

struct _GxmlXparserDumpAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GAsyncReadyCallback _callback_;
	gboolean _task_complete_;
	GXmlXParser* self;
	gchar* result;
	gint size;
	xmlDoc* doc;
	xmlTextWriter* _tmp0_;
	GXmlDomNode* _tmp1_;
	xmlTextWriter* _tmp2_;
	xmlTextWriter* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	GXmlDomNode* _tmp6_;
	GXmlDomNode* _tmp7_;
	GXmlDomNode* _tmp8_;
	GXmlDomElement* _tmp9_;
	GXmlDomElement* _tmp10_;
	GXmlDomElement* _tmp11_;
	gboolean _tmp12_;
	xmlTextWriter* _tmp13_;
	GXmlDomNode* _tmp14_;
	xmlTextWriter* _tmp15_;
	xmlTextWriter* _tmp16_;
	xmlTextWriter* _tmp17_;
	gchar* str;
	xmlDoc* _tmp18_;
	gchar* _tmp19_;
	gint _tmp20_;
	GError* _inner_error0_;
};

struct _GxmlXparserStartNodeAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GAsyncReadyCallback _callback_;
	gboolean _task_complete_;
	GXmlXParser* self;
	GXmlDomNode* node;
	xmlTextWriter* _tmp0_;
	GError* _tmp1_;
	gint size;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gboolean _tmp5_;
	gchar* lpns;
	GXmlDomNode* _tmp6_;
	GXmlDomNode* _tmp7_;
	GXmlDomNode* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gboolean _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gboolean _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	xmlTextWriter* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	xmlTextWriter* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	xmlTextWriter* _tmp37_;
	gchar* _tmp38_;
	gchar* _tmp39_;
	gchar* _tmp40_;
	GList* lp;
	GList* _tmp41_;
	GList* _tmp42_;
	GList* pspec_collection;
	GList* pspec_it;
	GParamSpec* _tmp43_;
	GParamSpec* pspec;
	gchar* attname;
	GParamSpec* _tmp44_;
	const gchar* _tmp45_;
	gchar* _tmp46_;
	gchar* val;
	GParamSpec* _tmp47_;
	GValue v;
	GParamSpec* _tmp48_;
	GValue _tmp49_;
	GParamSpec* _tmp50_;
	const gchar* _tmp51_;
	GXmlGomProperty* gp;
	GObject* _tmp52_;
	GXmlGomProperty* _tmp53_;
	GXmlGomProperty* _tmp54_;
	GXmlGomProperty* _tmp55_;
	gchar* _tmp56_;
	gchar* _tmp57_;
	GParamSpec* _tmp58_;
	gchar* _tmp59_;
	const gchar* _tmp60_;
	xmlTextWriter* _tmp61_;
	const gchar* _tmp62_;
	const gchar* _tmp63_;
	xmlTextWriter* _tmp64_;
	xmlTextWriter* _tmp65_;
	GeeIterator* _ak_it;
	GXmlDomNamedNodeMap* _tmp66_;
	GXmlDomNamedNodeMap* _tmp67_;
	GXmlDomNamedNodeMap* _tmp68_;
	GeeSet* _tmp69_;
	GeeSet* _tmp70_;
	GeeSet* _tmp71_;
	GeeIterator* _tmp72_;
	GeeIterator* _tmp73_;
	GeeIterator* _tmp74_;
	gchar* ak;
	GeeIterator* _tmp75_;
	gpointer _tmp76_;
	gchar* _vala1_v;
	GXmlDomNamedNodeMap* _tmp77_;
	GXmlDomNamedNodeMap* _tmp78_;
	GeeHashMap* _tmp79_;
	GeeHashMap* _tmp80_;
	const gchar* _tmp81_;
	gpointer _tmp82_;
	gchar* _tmp83_;
	const gchar* _tmp84_;
	gchar* ns;
	gchar* _tmp85_;
	gchar* _tmp86_;
	const gchar* _tmp87_;
	gchar** strs;
	const gchar* _tmp88_;
	gchar** _tmp89_;
	gchar** _tmp90_;
	gint strs_length1;
	gint _strs_size_;
	gchar** _tmp91_;
	gint _tmp91__length1;
	gchar* nsp;
	gchar** _tmp92_;
	gint _tmp92__length1;
	const gchar* _tmp93_;
	gchar* _tmp94_;
	gboolean _tmp95_;
	const gchar* _tmp96_;
	const gchar* _tmp97_;
	const gchar* _tmp98_;
	gchar* _tmp99_;
	gchar* _tmp100_;
	gchar* _tmp101_;
	xmlTextWriter* _tmp102_;
	const gchar* _tmp103_;
	const gchar* _tmp104_;
	xmlTextWriter* _tmp105_;
	xmlTextWriter* _tmp106_;
	GXmlDomNodeList* _n_list;
	GXmlDomNodeList* _tmp107_;
	GXmlDomNodeList* _tmp108_;
	gint _n_size;
	GXmlDomNodeList* _tmp109_;
	gint _tmp110_;
	gint _tmp111_;
	gint _n_index;
	GXmlDomNode* n;
	GXmlDomNodeList* _tmp112_;
	gpointer _tmp113_;
	GXmlDomNode* _tmp114_;
	GError* _inner_error0_;
};

static gint GXmlXParser_private_offset;
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;
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,
                                     GError** error);
static gchar* gxml_xparser_dump (GXmlXParser* self,
                          GError** error);
static guint8* _vala_array_dup8 (guint8* self,
                          int length);
GCancellable* gxml_parser_get_cancellable (GXmlParser* self);
static void gxml_xparser_real_write_stream_async_data_free (gpointer _data);
static void gxml_xparser_real_write_stream_async_async_ready_wrapper (GObject *source_object,
                                                               GAsyncResult *res,
                                                               void *user_data);
static void gxml_xparser_real_write_stream_async (GXmlParser* base,
                                           GOutputStream* stream,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_);
static gboolean gxml_xparser_real_write_stream_async_co (GxmlXparserWriteStreamAsyncData* _data_);
static void gxml_xparser_dump_async (GXmlXParser* self,
                              GAsyncReadyCallback _callback_,
                              gpointer _user_data_);
static gchar* gxml_xparser_dump_finish (GXmlXParser* self,
                                 GAsyncResult* _res_,
                                 GError** error);
static void gxml_xparser_write_stream_async_ready (GObject* source_object,
                                            GAsyncResult* _res_,
                                            gpointer _user_data_);
static guint8* _vala_array_dup9 (guint8* self,
                          int length);
static GInputStream* gxml_xparser_real_create_stream (GXmlParser* base,
                                               GError** error);
static guint8* _vala_array_dup10 (guint8* self,
                           int length);
static void gxml_xparser_real_create_stream_async_data_free (gpointer _data);
static void gxml_xparser_real_create_stream_async_async_ready_wrapper (GObject *source_object,
                                                                GAsyncResult *res,
                                                                void *user_data);
static void gxml_xparser_real_create_stream_async (GXmlParser* base,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
static gboolean gxml_xparser_real_create_stream_async_co (GxmlXparserCreateStreamAsyncData* _data_);
static void gxml_xparser_create_stream_async_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_);
static guint8* _vala_array_dup11 (guint8* self,
                           int length);
static gchar* gxml_xparser_real_write_string (GXmlParser* base,
                                       GError** error);
static void gxml_xparser_real_write_string_async_data_free (gpointer _data);
static void gxml_xparser_real_write_string_async_async_ready_wrapper (GObject *source_object,
                                                               GAsyncResult *res,
                                                               void *user_data);
static void gxml_xparser_real_write_string_async (GXmlParser* base,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_);
static gboolean gxml_xparser_real_write_string_async_co (GxmlXparserWriteStringAsyncData* _data_);
static void gxml_xparser_write_string_async_ready (GObject* source_object,
                                            GAsyncResult* _res_,
                                            gpointer _user_data_);
static void gxml_xparser_real_read_string (GXmlParser* base,
                                    const gchar* str,
                                    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,
                              GError** error);
static void gxml_xparser_real_read_string_async_data_free (gpointer _data);
static void gxml_xparser_real_read_string_async_async_ready_wrapper (GObject *source_object,
                                                              GAsyncResult *res,
                                                              void *user_data);
static void gxml_xparser_real_read_string_async (GXmlParser* base,
                                          const gchar* str,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_);
static gboolean gxml_xparser_real_read_string_async_co (GxmlXparserReadStringAsyncData* _data_);
static guint8* _vala_array_dup13 (guint8* self,
                           int length);
void gxml_parser_read_string_async (GXmlParser* self,
                                    const gchar* str,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);
void gxml_parser_read_string_finish (GXmlParser* self,
                                     GAsyncResult* _res_,
                                     GError** error);
static gboolean _gxml_xparser_real_read_string_async_co_gsource_func (gpointer self);
void gxml_parser_read_stream_async (GXmlParser* self,
                                    GInputStream* stream,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);
void gxml_parser_read_stream_finish (GXmlParser* self,
                                     GAsyncResult* _res_,
                                     GError** error);
static void gxml_xparser_read_string_async_ready (GObject* source_object,
                                           GAsyncResult* _res_,
                                           gpointer _user_data_);
static gint gxml_xparser_read_callback (void* context,
                                 gchar* buffer,
                                 gint len);
static gint gxml_xparser_close_callback (void* context);
static void gxml_xparser_real_read_stream (GXmlParser* base,
                                    GInputStream* istream,
                                    GError** error);
void gxml_parser_set_cancellable (GXmlParser* self,
                                  GCancellable* value);
static gint _gxml_xparser_read_callback_xml_input_read_callback (void* context,
                                                          gchar* buffer,
                                                          gint len);
static gint _gxml_xparser_close_callback_xml_input_close_callback (void* context);
void gxml_xparser_read_node (GXmlXParser* self,
                             GXmlDomNode* node,
                             GError** error);
static void gxml_xparser_real_read_stream_async_data_free (gpointer _data);
static void gxml_xparser_real_read_stream_async_async_ready_wrapper (GObject *source_object,
                                                              GAsyncResult *res,
                                                              void *user_data);
static void gxml_xparser_real_read_stream_async (GXmlParser* base,
                                          GInputStream* istream,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_);
static gboolean gxml_xparser_real_read_stream_async_co (GxmlXparserReadStreamAsyncData* _data_);
static gboolean _gxml_xparser_real_read_stream_async_co_gsource_func (gpointer self);
gboolean gxml_parser_move_next_node (GXmlParser* self,
                                     GError** error);
gboolean gxml_parser_current_is_element (GXmlParser* self);
gchar* gxml_parser_current_node_name (GXmlParser* self);
gchar* gxml_dom_element_get_local_name (GXmlDomElement* self);
gboolean gxml_parser_current_is_document (GXmlParser* self);
gboolean gxml_parser_read_child_node (GXmlParser* self,
                                      GXmlDomNode* parent,
                                      GError** error);
void gxml_parser_read_element (GXmlParser* self,
                               GXmlDomElement* element,
                               GError** error);
gboolean gxml_parser_read_child_element (GXmlParser* self,
                                         GXmlDomNode* parent,
                                         GError** error);
GType gxml_gom_node_get_type (void) G_GNUC_CONST;
GType gxml_gom_document_get_type (void) G_GNUC_CONST;
void gxml_parser_read_child_nodes (GXmlParser* self,
                                   GXmlDomNode* parent,
                                   GError** error);
GType gxml_gom_element_get_type (void) G_GNUC_CONST;
gboolean gxml_gom_element_get_parse_children (GXmlGomElement* self);
gchar* gxml_parser_read_unparsed (GXmlParser* self,
                                  GError** error);
void gxml_gom_element_set_unparsed (GXmlGomElement* self,
                                    const gchar* value);
static void gxml_xparser_real_read_child_nodes_stream (GXmlParser* base,
                                                GInputStream* istream,
                                                GError** error);
static void gxml_xparser_read_child_nodes_stream_async_data_free (gpointer _data);
static void gxml_xparser_read_child_nodes_stream_async_async_ready_wrapper (GObject *source_object,
                                                                     GAsyncResult *res,
                                                                     void *user_data);
void gxml_xparser_read_child_nodes_stream_async (GXmlXParser* self,
                                                 GInputStream* istream,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_);
void gxml_xparser_read_child_nodes_stream_finish (GXmlXParser* self,
                                                  GAsyncResult* _res_,
                                                  GError** error);
static gboolean gxml_xparser_read_child_nodes_stream_async_co (GxmlXparserReadChildNodesStreamAsyncData* _data_);
static gboolean _gxml_xparser_read_child_nodes_stream_async_co_gsource_func (gpointer self);
void gxml_parser_read_child_nodes_async (GXmlParser* self,
                                         GXmlDomNode* parent,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_);
void gxml_parser_read_child_nodes_finish (GXmlParser* self,
                                          GAsyncResult* _res_,
                                          GError** error);
static void gxml_xparser_read_child_nodes_stream_async_ready (GObject* source_object,
                                                       GAsyncResult* _res_,
                                                       gpointer _user_data_);
static gchar* gxml_xparser_real_read_unparsed (GXmlParser* base,
                                        GError** error);
static gboolean gxml_xparser_real_move_next_node (GXmlParser* base,
                                           GError** error);
static gboolean gxml_xparser_real_current_is_empty_element (GXmlParser* base);
static gboolean gxml_xparser_real_current_is_element (GXmlParser* base);
static gboolean gxml_xparser_real_current_is_document (GXmlParser* base);
static gchar* gxml_xparser_real_current_node_name (GXmlParser* base);
static GXmlDomElement* gxml_xparser_real_create_element (GXmlParser* base,
                                                  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);
static void gxml_xparser_real_read_element (GXmlParser* base,
                                     GXmlDomElement* element,
                                     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_property_get_type (void) G_GNUC_CONST;
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);
static gboolean gxml_xparser_real_read_child_node (GXmlParser* base,
                                            GXmlDomNode* parent,
                                            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);
GXmlGomDocumentType* gxml_gom_document_type_new (GXmlDomDocument* doc,
                                                 const gchar* name,
                                                 const gchar* public_id,
                                                 const gchar* system_id);
GXmlGomDocumentType* gxml_gom_document_type_construct (GType object_type,
                                                       GXmlDomDocument* doc,
                                                       const gchar* name,
                                                       const gchar* public_id,
                                                       const gchar* system_id);
GType gxml_gom_document_type_get_type (void) G_GNUC_CONST;
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);
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);
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);
GType gxml_gom_attr_get_type (void) G_GNUC_CONST;
gboolean gxml_gom_attr_get_is_referenced (GXmlGomAttr* self);
GType gxml_dom_attr_get_type (void) G_GNUC_CONST;
gchar* gxml_dom_attr_get_value (GXmlDomAttr* self);
static void _g_param_spec_unref0_ (gpointer var);
static inline void _g_list_free__g_param_spec_unref0_ (GList* self);
GXmlDomNodeList* gxml_dom_node_get_child_nodes (GXmlDomNode* self);
static void gxml_xparser_write_node (GXmlXParser* self,
                              GXmlDomNode* n,
                              GError** error);
static void gxml_xparser_dump_async_data_free (gpointer _data);
static void gxml_xparser_dump_async_async_ready_wrapper (GObject *source_object,
                                                  GAsyncResult *res,
                                                  void *user_data);
static gboolean gxml_xparser_dump_async_co (GxmlXparserDumpAsyncData* _data_);
static gboolean _gxml_xparser_dump_async_co_gsource_func (gpointer self);
static void gxml_xparser_start_node_async (GXmlXParser* self,
                                    GXmlDomNode* node,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);
static void gxml_xparser_start_node_finish (GXmlXParser* self,
                                     GAsyncResult* _res_,
                                     GError** error);
static void gxml_xparser_dump_async_ready (GObject* source_object,
                                    GAsyncResult* _res_,
                                    gpointer _user_data_);
static void gxml_xparser_start_node_async_data_free (gpointer _data);
static void gxml_xparser_start_node_async_async_ready_wrapper (GObject *source_object,
                                                        GAsyncResult *res,
                                                        void *user_data);
static gboolean gxml_xparser_start_node_async_co (GxmlXparserStartNodeAsyncData* _data_);
static gboolean _gxml_xparser_start_node_async_co_gsource_func (gpointer 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);
const gchar* gxml_dom_document_type_get_name (GXmlDomDocumentType* self);
const gchar* gxml_dom_document_type_get_public_id (GXmlDomDocumentType* self);
const gchar* gxml_dom_document_type_get_system_id (GXmlDomDocumentType* 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 inline gpointer
gxml_xparser_get_instance_private (GXmlXParser* self)
{
	return G_STRUCT_MEMBER_P (self, GXmlXParser_private_offset);
}

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

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

static guint8*
string_get_data (const gchar* self,
                 gint* result_length1)
{
	guint8* result;
	guint8* res = NULL;
	gint res_length1;
	gint _res_size_;
	gint _tmp0_;
	gint _tmp1_;
	guint8* _tmp2_;
	gint _tmp2__length1;
	guint8* _tmp3_;
	gint _tmp3__length1;
	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;
	_tmp2__length1 = res_length1;
	_tmp3_ = _tmp2_;
	_tmp3__length1 = _tmp2__length1;
	if (result_length1) {
		*result_length1 = _tmp3__length1;
	}
	result = _tmp3_;
	return result;
}

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

static void
gxml_xparser_real_write_stream (GXmlParser* base,
                                GOutputStream* stream,
                                GError** error)
{
	GXmlXParser * self;
	gchar* s = NULL;
	gchar* _tmp0_;
	GMemoryInputStream* b = NULL;
	const gchar* _tmp1_;
	guint8* _tmp2_;
	gint _tmp2__length1;
	guint8* _tmp3_;
	gint _tmp3__length1;
	guint8* _tmp4_;
	gint _tmp4__length1;
	GMemoryInputStream* _tmp5_;
	GMemoryInputStream* _tmp6_;
	GCancellable* _tmp7_;
	GCancellable* _tmp8_;
	GError* _inner_error0_ = NULL;
	self = (GXmlXParser*) base;
	g_return_if_fail (stream != NULL);
	_tmp0_ = gxml_xparser_dump (self, &_inner_error0_);
	s = _tmp0_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return;
	}
	_tmp1_ = s;
	_tmp2_ = string_get_data (_tmp1_, &_tmp2__length1);
	_tmp3_ = _tmp2_;
	_tmp3__length1 = _tmp2__length1;
	_tmp4_ = (_tmp3_ != NULL) ? _vala_array_dup8 (_tmp3_, _tmp3__length1) : ((gpointer) _tmp3_);
	_tmp4__length1 = _tmp3__length1;
	_tmp5_ = (GMemoryInputStream*) g_memory_input_stream_new_from_data (_tmp4_, _tmp4__length1, NULL);
	b = _tmp5_;
	_tmp6_ = b;
	_tmp7_ = gxml_parser_get_cancellable ((GXmlParser*) self);
	_tmp8_ = _tmp7_;
	g_output_stream_splice (stream, (GInputStream*) _tmp6_, G_OUTPUT_STREAM_SPLICE_NONE, _tmp8_, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (b);
		_g_free0 (s);
		return;
	}
	g_output_stream_close (stream, NULL, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (b);
		_g_free0 (s);
		return;
	}
	_xmlFreeTextWriter0 (self->priv->tw);
	self->priv->tw = NULL;
	_g_object_unref0 (b);
	_g_free0 (s);
}

static void
gxml_xparser_real_write_stream_async_data_free (gpointer _data)
{
	GxmlXparserWriteStreamAsyncData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_g_object_unref0 (_data_->self);
	g_slice_free (GxmlXparserWriteStreamAsyncData, _data_);
}

static void
gxml_xparser_real_write_stream_async_async_ready_wrapper (GObject *source_object,
                                                          GAsyncResult *res,
                                                          void *user_data)
{
	GxmlXparserWriteStreamAsyncData* _task_data_;
	_task_data_ = g_task_get_task_data (G_TASK (res));
	if (_task_data_->_callback_ != NULL) {
		_task_data_->_callback_ (source_object, res, user_data);
	}
	_task_data_->_task_complete_ = TRUE;
}

static void
gxml_xparser_real_write_stream_async (GXmlParser* base,
                                      GOutputStream* stream,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_)
{
	GXmlXParser * self;
	GxmlXparserWriteStreamAsyncData* _data_;
	GXmlXParser* _tmp0_;
	GOutputStream* _tmp1_;
	self = (GXmlXParser*) base;
	_data_ = g_slice_new0 (GxmlXparserWriteStreamAsyncData);
	_data_->_callback_ = _callback_;
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, gxml_xparser_real_write_stream_async_async_ready_wrapper, _user_data_);
	if (_callback_ == NULL) {
		_data_->_task_complete_ = TRUE;
	}
	g_task_set_task_data (_data_->_async_result, _data_, gxml_xparser_real_write_stream_async_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (stream);
	_g_object_unref0 (_data_->stream);
	_data_->stream = _tmp1_;
	gxml_xparser_real_write_stream_async_co (_data_);
}

static void
gxml_xparser_write_stream_finish (GXmlParser* base,
                                  GAsyncResult* _res_,
                                  GError** error)
{
	GxmlXparserWriteStreamAsyncData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static void
gxml_xparser_write_stream_async_ready (GObject* source_object,
                                       GAsyncResult* _res_,
                                       gpointer _user_data_)
{
	GxmlXparserWriteStreamAsyncData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_data_->_task_complete_ = TRUE;
	gxml_xparser_real_write_stream_async_co (_data_);
}

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

static gboolean
gxml_xparser_real_write_stream_async_co (GxmlXparserWriteStreamAsyncData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_state_ = 1;
	gxml_xparser_dump_async (_data_->self, gxml_xparser_write_stream_async_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp0_ = gxml_xparser_dump_finish (_data_->self, _data_->_res_, &_data_->_inner_error0_);
	_data_->s = _data_->_tmp0_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp1_ = _data_->s;
	_data_->_tmp2_ = string_get_data (_data_->_tmp1_, &_data_->_tmp2__length1);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp3__length1 = _data_->_tmp2__length1;
	_data_->_tmp4_ = (_data_->_tmp3_ != NULL) ? _vala_array_dup9 (_data_->_tmp3_, _data_->_tmp3__length1) : ((gpointer) _data_->_tmp3_);
	_data_->_tmp4__length1 = _data_->_tmp3__length1;
	_data_->_tmp5_ = (GMemoryInputStream*) g_memory_input_stream_new_from_data (_data_->_tmp4_, _data_->_tmp4__length1, NULL);
	_data_->b = _data_->_tmp5_;
	_data_->_tmp6_ = _data_->b;
	_data_->_tmp7_ = gxml_parser_get_cancellable ((GXmlParser*) _data_->self);
	_data_->_tmp8_ = _data_->_tmp7_;
	_data_->_state_ = 2;
	g_output_stream_splice_async (_data_->stream, (GInputStream*) _data_->_tmp6_, G_OUTPUT_STREAM_SPLICE_NONE, 0, _data_->_tmp8_, gxml_xparser_write_stream_async_ready, _data_);
	return FALSE;
	_state_2:
	g_output_stream_splice_finish (_data_->stream, _data_->_res_, &_data_->_inner_error0_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_g_object_unref0 (_data_->b);
		_g_free0 (_data_->s);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_xmlFreeTextWriter0 (_data_->self->priv->tw);
	_data_->self->priv->tw = NULL;
	_g_object_unref0 (_data_->b);
	_g_free0 (_data_->s);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!_data_->_task_complete_) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

/**
   * Creates an {@link GLib.InputStream} to write a string representation
   * in XML
   */
static guint8*
_vala_array_dup10 (guint8* self,
                   int length)
{
	return g_memdup (self, length * sizeof (guint8));
}

static GInputStream*
gxml_xparser_real_create_stream (GXmlParser* base,
                                 GError** error)
{
	GXmlXParser * self;
	GInputStream* result = NULL;
	gchar* s = NULL;
	gchar* _tmp0_;
	guint8* _tmp1_;
	gint _tmp1__length1;
	guint8* _tmp2_;
	gint _tmp2__length1;
	guint8* _tmp3_;
	gint _tmp3__length1;
	GMemoryInputStream* _tmp4_;
	GError* _inner_error0_ = NULL;
	self = (GXmlXParser*) base;
	_tmp0_ = gxml_xparser_dump (self, &_inner_error0_);
	s = _tmp0_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	_xmlFreeTextWriter0 (self->priv->tw);
	self->priv->tw = NULL;
	_tmp1_ = string_get_data (s, &_tmp1__length1);
	_tmp2_ = _tmp1_;
	_tmp2__length1 = _tmp1__length1;
	_tmp3_ = (_tmp2_ != NULL) ? _vala_array_dup10 (_tmp2_, _tmp2__length1) : ((gpointer) _tmp2_);
	_tmp3__length1 = _tmp2__length1;
	_tmp4_ = (GMemoryInputStream*) g_memory_input_stream_new_from_data (_tmp3_, _tmp3__length1, NULL);
	result = (GInputStream*) _tmp4_;
	_g_free0 (s);
	return result;
}

static void
gxml_xparser_real_create_stream_async_data_free (gpointer _data)
{
	GxmlXparserCreateStreamAsyncData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (GxmlXparserCreateStreamAsyncData, _data_);
}

static void
gxml_xparser_real_create_stream_async_async_ready_wrapper (GObject *source_object,
                                                           GAsyncResult *res,
                                                           void *user_data)
{
	GxmlXparserCreateStreamAsyncData* _task_data_;
	_task_data_ = g_task_get_task_data (G_TASK (res));
	if (_task_data_->_callback_ != NULL) {
		_task_data_->_callback_ (source_object, res, user_data);
	}
	_task_data_->_task_complete_ = TRUE;
}

static void
gxml_xparser_real_create_stream_async (GXmlParser* base,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	GXmlXParser * self;
	GxmlXparserCreateStreamAsyncData* _data_;
	GXmlXParser* _tmp0_;
	self = (GXmlXParser*) base;
	_data_ = g_slice_new0 (GxmlXparserCreateStreamAsyncData);
	_data_->_callback_ = _callback_;
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, gxml_xparser_real_create_stream_async_async_ready_wrapper, _user_data_);
	if (_callback_ == NULL) {
		_data_->_task_complete_ = TRUE;
	}
	g_task_set_task_data (_data_->_async_result, _data_, gxml_xparser_real_create_stream_async_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	gxml_xparser_real_create_stream_async_co (_data_);
}

static GInputStream*
gxml_xparser_create_stream_finish (GXmlParser* base,
                                   GAsyncResult* _res_,
                                   GError** error)
{
	GInputStream* result;
	GxmlXparserCreateStreamAsyncData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return NULL;
	}
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

/**
   * Creates asynchronically an {@link GLib.InputStream} to write a string representation
   * in XML
   */
static void
gxml_xparser_create_stream_async_ready (GObject* source_object,
                                        GAsyncResult* _res_,
                                        gpointer _user_data_)
{
	GxmlXparserCreateStreamAsyncData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_data_->_task_complete_ = TRUE;
	gxml_xparser_real_create_stream_async_co (_data_);
}

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

static gboolean
gxml_xparser_real_create_stream_async_co (GxmlXparserCreateStreamAsyncData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_state_ = 1;
	gxml_xparser_dump_async (_data_->self, gxml_xparser_create_stream_async_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp0_ = gxml_xparser_dump_finish (_data_->self, _data_->_res_, &_data_->_inner_error0_);
	_data_->s = _data_->_tmp0_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_xmlFreeTextWriter0 (_data_->self->priv->tw);
	_data_->self->priv->tw = NULL;
	_data_->_tmp1_ = string_get_data (_data_->s, &_data_->_tmp1__length1);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp2__length1 = _data_->_tmp1__length1;
	_data_->_tmp3_ = (_data_->_tmp2_ != NULL) ? _vala_array_dup11 (_data_->_tmp2_, _data_->_tmp2__length1) : ((gpointer) _data_->_tmp2_);
	_data_->_tmp3__length1 = _data_->_tmp2__length1;
	_data_->_tmp4_ = (GMemoryInputStream*) g_memory_input_stream_new_from_data (_data_->_tmp3_, _data_->_tmp3__length1, NULL);
	_data_->result = (GInputStream*) _data_->_tmp4_;
	_g_free0 (_data_->s);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!_data_->_task_complete_) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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

static void
gxml_xparser_real_write_string_async_data_free (gpointer _data)
{
	GxmlXparserWriteStringAsyncData* _data_;
	_data_ = _data;
	_g_free0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (GxmlXparserWriteStringAsyncData, _data_);
}

static void
gxml_xparser_real_write_string_async_async_ready_wrapper (GObject *source_object,
                                                          GAsyncResult *res,
                                                          void *user_data)
{
	GxmlXparserWriteStringAsyncData* _task_data_;
	_task_data_ = g_task_get_task_data (G_TASK (res));
	if (_task_data_->_callback_ != NULL) {
		_task_data_->_callback_ (source_object, res, user_data);
	}
	_task_data_->_task_complete_ = TRUE;
}

static void
gxml_xparser_real_write_string_async (GXmlParser* base,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_)
{
	GXmlXParser * self;
	GxmlXparserWriteStringAsyncData* _data_;
	GXmlXParser* _tmp0_;
	self = (GXmlXParser*) base;
	_data_ = g_slice_new0 (GxmlXparserWriteStringAsyncData);
	_data_->_callback_ = _callback_;
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, gxml_xparser_real_write_string_async_async_ready_wrapper, _user_data_);
	if (_callback_ == NULL) {
		_data_->_task_complete_ = TRUE;
	}
	g_task_set_task_data (_data_->_async_result, _data_, gxml_xparser_real_write_string_async_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	gxml_xparser_real_write_string_async_co (_data_);
}

static gchar*
gxml_xparser_write_string_finish (GXmlParser* base,
                                  GAsyncResult* _res_,
                                  GError** error)
{
	gchar* result;
	GxmlXparserWriteStringAsyncData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return NULL;
	}
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
gxml_xparser_write_string_async_ready (GObject* source_object,
                                       GAsyncResult* _res_,
                                       gpointer _user_data_)
{
	GxmlXparserWriteStringAsyncData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_data_->_task_complete_ = TRUE;
	gxml_xparser_real_write_string_async_co (_data_);
}

static gboolean
gxml_xparser_real_write_string_async_co (GxmlXparserWriteStringAsyncData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_state_ = 1;
	gxml_xparser_dump_async (_data_->self, gxml_xparser_write_string_async_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = gxml_xparser_dump_finish (_data_->self, _data_->_res_, &_data_->_inner_error0_);
	_data_->_tmp0_ = _data_->_tmp1_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp2_ = _data_->_tmp0_;
	_data_->_tmp0_ = NULL;
	_data_->result = _data_->_tmp2_;
	_g_free0 (_data_->_tmp0_);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!_data_->_task_complete_) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

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,
                               GError** error)
{
	GXmlXParser * self;
	GMemoryInputStream* stream = NULL;
	guint8* _tmp1_;
	gint _tmp1__length1;
	guint8* _tmp2_;
	gint _tmp2__length1;
	guint8* _tmp3_;
	gint _tmp3__length1;
	GDestroyNotify _tmp4_;
	GMemoryInputStream* _tmp5_;
	GError* _inner_error0_ = NULL;
	self = (GXmlXParser*) base;
	g_return_if_fail (str != NULL);
	if (g_strcmp0 (str, "") == 0) {
		GError* _tmp0_;
		_tmp0_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _ ("Invalid document string, it is empty or is not allowed"));
		_inner_error0_ = _tmp0_;
		g_propagate_error (error, _inner_error0_);
		return;
	}
	_tmp1_ = string_get_data (str, &_tmp1__length1);
	_tmp2_ = _tmp1_;
	_tmp2__length1 = _tmp1__length1;
	_tmp3_ = (_tmp2_ != NULL) ? _vala_array_dup12 (_tmp2_, _tmp2__length1) : ((gpointer) _tmp2_);
	_tmp3__length1 = _tmp2__length1;
	_tmp4_ = g_free;
	_tmp5_ = (GMemoryInputStream*) g_memory_input_stream_new_from_data (_tmp3_, _tmp3__length1, _tmp4_);
	stream = _tmp5_;
	gxml_parser_read_stream ((GXmlParser*) self, (GInputStream*) stream, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (stream);
		return;
	}
	_g_object_unref0 (stream);
}

static void
gxml_xparser_real_read_string_async_data_free (gpointer _data)
{
	GxmlXparserReadStringAsyncData* _data_;
	_data_ = _data;
	_g_free0 (_data_->str);
	_g_object_unref0 (_data_->self);
	g_slice_free (GxmlXparserReadStringAsyncData, _data_);
}

static void
gxml_xparser_real_read_string_async_async_ready_wrapper (GObject *source_object,
                                                         GAsyncResult *res,
                                                         void *user_data)
{
	GxmlXparserReadStringAsyncData* _task_data_;
	_task_data_ = g_task_get_task_data (G_TASK (res));
	if (_task_data_->_callback_ != NULL) {
		_task_data_->_callback_ (source_object, res, user_data);
	}
	_task_data_->_task_complete_ = TRUE;
}

static void
gxml_xparser_real_read_string_async (GXmlParser* base,
                                     const gchar* str,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_)
{
	GXmlXParser * self;
	GxmlXparserReadStringAsyncData* _data_;
	GXmlXParser* _tmp0_;
	gchar* _tmp1_;
	self = (GXmlXParser*) base;
	_data_ = g_slice_new0 (GxmlXparserReadStringAsyncData);
	_data_->_callback_ = _callback_;
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, gxml_xparser_real_read_string_async_async_ready_wrapper, _user_data_);
	if (_callback_ == NULL) {
		_data_->_task_complete_ = TRUE;
	}
	g_task_set_task_data (_data_->_async_result, _data_, gxml_xparser_real_read_string_async_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (str);
	_g_free0 (_data_->str);
	_data_->str = _tmp1_;
	gxml_xparser_real_read_string_async_co (_data_);
}

static void
gxml_xparser_read_string_finish (GXmlParser* base,
                                 GAsyncResult* _res_,
                                 GError** error)
{
	GxmlXparserReadStringAsyncData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

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

static gboolean
_gxml_xparser_real_read_string_async_co_gsource_func (gpointer self)
{
	gboolean result;
	result = gxml_xparser_real_read_string_async_co (self);
	return result;
}

static void
gxml_xparser_read_string_async_ready (GObject* source_object,
                                      GAsyncResult* _res_,
                                      gpointer _user_data_)
{
	GxmlXparserReadStringAsyncData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_data_->_task_complete_ = TRUE;
	gxml_xparser_real_read_string_async_co (_data_);
}

static gboolean
gxml_xparser_real_read_string_async_co (GxmlXparserReadStringAsyncData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (g_strcmp0 (_data_->str, "") == 0) {
		_data_->_tmp0_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _ ("Invalid document string, it is empty or is not allowed"));
		_data_->_inner_error0_ = _data_->_tmp0_;
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp1_ = string_get_data (_data_->str, &_data_->_tmp1__length1);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp2__length1 = _data_->_tmp1__length1;
	_data_->_tmp3_ = (_data_->_tmp2_ != NULL) ? _vala_array_dup13 (_data_->_tmp2_, _data_->_tmp2__length1) : ((gpointer) _data_->_tmp2_);
	_data_->_tmp3__length1 = _data_->_tmp2__length1;
	_data_->_tmp4_ = g_free;
	_data_->_tmp5_ = (GMemoryInputStream*) g_memory_input_stream_new_from_data (_data_->_tmp3_, _data_->_tmp3__length1, _data_->_tmp4_);
	_data_->stream = _data_->_tmp5_;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _gxml_xparser_real_read_string_async_co_gsource_func, _data_, NULL);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	_data_->_state_ = 2;
	gxml_parser_read_stream_async ((GXmlParser*) _data_->self, (GInputStream*) _data_->stream, gxml_xparser_read_string_async_ready, _data_);
	return FALSE;
	_state_2:
	gxml_parser_read_stream_finish ((GXmlParser*) _data_->self, _data_->_res_, &_data_->_inner_error0_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_g_object_unref0 (_data_->stream);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_data_->stream);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!_data_->_task_complete_) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static gint
gxml_xparser_read_callback (void* context,
                            gchar* buffer,
                            gint len)
{
	gint result = 0;
	GXmlXParser* parser = NULL;
	GXmlXParser* _tmp0_;
	GDataInputStream* _tmp1_;
	gint dr = 0;
	GError* _inner_error0_ = NULL;
	parser = (GXmlXParser*) context;
	_tmp0_ = parser;
	_tmp1_ = _tmp0_->priv->tistream;
	if (_tmp1_ == NULL) {
		g_warning ("XParser.vala:118: %s", _ ("Invalid input stream to read data from"));
		result = -1;
		return result;
	}
	dr = 0;
	{
		gint bs = 0;
		GXmlXParser* _tmp2_;
		GDataInputStream* _tmp3_;
		_tmp2_ = parser;
		_tmp3_ = _tmp2_->priv->tistream;
		bs = (gint) g_buffered_input_stream_get_buffer_size ((GBufferedInputStream*) _tmp3_);
		while (TRUE) {
			gint _tmp4_ = 0;
			gssize r = 0L;
			GXmlXParser* _tmp5_;
			GDataInputStream* _tmp6_;
			GXmlXParser* _tmp7_;
			GCancellable* _tmp8_;
			GCancellable* _tmp9_;
			gint bdr = 0;
			if (!(dr < len)) {
				break;
			}
			if (bs > (len - dr)) {
				_tmp4_ = len - dr;
			} else {
				_tmp4_ = bs;
			}
			_tmp5_ = parser;
			_tmp6_ = _tmp5_->priv->tistream;
			_tmp7_ = parser;
			_tmp8_ = gxml_parser_get_cancellable ((GXmlParser*) _tmp7_);
			_tmp9_ = _tmp8_;
			r = g_buffered_input_stream_fill ((GBufferedInputStream*) _tmp6_, (gssize) _tmp4_, _tmp9_, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch31_g_error;
			}
			if (r == ((gssize) 0)) {
				break;
			}
			bdr = 0;
			while (TRUE) {
				guint8 _tmp10_ = 0U;
				GXmlXParser* _tmp11_;
				GDataInputStream* _tmp12_;
				GXmlXParser* _tmp13_;
				GCancellable* _tmp14_;
				GCancellable* _tmp15_;
				gint _tmp16_;
				if (!(((gssize) bdr) < r)) {
					break;
				}
				_tmp11_ = parser;
				_tmp12_ = _tmp11_->priv->tistream;
				_tmp13_ = parser;
				_tmp14_ = gxml_parser_get_cancellable ((GXmlParser*) _tmp13_);
				_tmp15_ = _tmp14_;
				_tmp10_ = g_data_input_stream_read_byte (_tmp12_, _tmp15_, &_inner_error0_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					goto __catch31_g_error;
				}
				buffer[dr + bdr] = (gchar) _tmp10_;
				_tmp16_ = bdr;
				bdr = _tmp16_ + 1;
			}
			dr = dr + bdr;
		}
	}
	goto __finally31;
	__catch31_g_error:
	{
		GError* e = NULL;
		GError* _tmp17_;
		const gchar* _tmp18_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp17_ = e;
		_tmp18_ = _tmp17_->message;
		g_message (_ ("Error reading stream: %s"), _tmp18_);
		result = -1;
		_g_error_free0 (e);
		return result;
	}
	__finally31:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gint _tmp19_ = -1;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp19_;
	}
	result = dr;
	return result;
}

static gint
gxml_xparser_close_callback (void* context)
{
	gint result = 0;
	GXmlXParser* parser = NULL;
	GXmlXParser* _tmp0_;
	GDataInputStream* _tmp1_;
	GError* _inner_error0_ = NULL;
	parser = (GXmlXParser*) context;
	_tmp0_ = parser;
	_tmp1_ = _tmp0_->priv->tistream;
	if (_tmp1_ == NULL) {
		result = 0;
		return result;
	}
	{
		GXmlXParser* _tmp2_;
		GDataInputStream* _tmp3_;
		GXmlXParser* _tmp4_;
		GCancellable* _tmp5_;
		GCancellable* _tmp6_;
		_tmp2_ = parser;
		_tmp3_ = _tmp2_->priv->tistream;
		_tmp4_ = parser;
		_tmp5_ = gxml_parser_get_cancellable ((GXmlParser*) _tmp4_);
		_tmp6_ = _tmp5_;
		g_input_stream_close ((GInputStream*) _tmp3_, _tmp6_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch32_g_error;
		}
	}
	goto __finally32;
	__catch32_g_error:
	{
		GError* e = NULL;
		GError* _tmp7_;
		const gchar* _tmp8_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp7_ = e;
		_tmp8_ = _tmp7_->message;
		g_warning (_ ("Error closing stream: %s"), _tmp8_);
		result = -1;
		_g_error_free0 (e);
		return result;
	}
	__finally32:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gint _tmp9_ = -1;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp9_;
	}
	result = 0;
	return result;
}

static gint
_gxml_xparser_read_callback_xml_input_read_callback (void* context,
                                                     gchar* buffer,
                                                     gint len)
{
	gint result;
	result = gxml_xparser_read_callback (context, buffer, len);
	return result;
}

static gint
_gxml_xparser_close_callback_xml_input_close_callback (void* context)
{
	gint result;
	result = gxml_xparser_close_callback (context);
	return result;
}

static void
gxml_xparser_real_read_stream (GXmlParser* base,
                               GInputStream* istream,
                               GError** error)
{
	GXmlXParser * self;
	GCancellable* _tmp0_;
	GCancellable* _tmp1_;
	GDataInputStream* _tmp2_;
	xmlTextReader* _tmp3_;
	GXmlDomNode* _tmp4_;
	GXmlDomNode* _tmp5_;
	GXmlDomNode* _tmp6_;
	GError* _inner_error0_ = NULL;
	self = (GXmlXParser*) base;
	g_return_if_fail (istream != NULL);
	_tmp0_ = gxml_parser_get_cancellable ((GXmlParser*) self);
	_tmp1_ = _tmp0_;
	gxml_parser_set_cancellable ((GXmlParser*) self, _tmp1_);
	_tmp2_ = g_data_input_stream_new (istream);
	_g_object_unref0 (self->priv->tistream);
	self->priv->tistream = _tmp2_;
	_tmp3_ = xmlReaderForIO (_gxml_xparser_read_callback_xml_input_read_callback, _gxml_xparser_close_callback_xml_input_close_callback, self, "", NULL, (gint) XML_PARSE_NOERROR);
	_xmlFreeTextReader0 (self->priv->tr);
	self->priv->tr = _tmp3_;
	_tmp4_ = self->priv->_node;
	g_object_freeze_notify ((GObject*) _tmp4_);
	_tmp5_ = self->priv->_node;
	gxml_xparser_read_node (self, _tmp5_, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return;
	}
	_tmp6_ = self->priv->_node;
	g_object_thaw_notify ((GObject*) _tmp6_);
	_xmlFreeTextReader0 (self->priv->tr);
	self->priv->tr = NULL;
	_g_object_unref0 (self->priv->tistream);
	self->priv->tistream = NULL;
}

static void
gxml_xparser_real_read_stream_async_data_free (gpointer _data)
{
	GxmlXparserReadStreamAsyncData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->istream);
	_g_object_unref0 (_data_->self);
	g_slice_free (GxmlXparserReadStreamAsyncData, _data_);
}

static void
gxml_xparser_real_read_stream_async_async_ready_wrapper (GObject *source_object,
                                                         GAsyncResult *res,
                                                         void *user_data)
{
	GxmlXparserReadStreamAsyncData* _task_data_;
	_task_data_ = g_task_get_task_data (G_TASK (res));
	if (_task_data_->_callback_ != NULL) {
		_task_data_->_callback_ (source_object, res, user_data);
	}
	_task_data_->_task_complete_ = TRUE;
}

static void
gxml_xparser_real_read_stream_async (GXmlParser* base,
                                     GInputStream* istream,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_)
{
	GXmlXParser * self;
	GxmlXparserReadStreamAsyncData* _data_;
	GXmlXParser* _tmp0_;
	GInputStream* _tmp1_;
	self = (GXmlXParser*) base;
	_data_ = g_slice_new0 (GxmlXparserReadStreamAsyncData);
	_data_->_callback_ = _callback_;
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, gxml_xparser_real_read_stream_async_async_ready_wrapper, _user_data_);
	if (_callback_ == NULL) {
		_data_->_task_complete_ = TRUE;
	}
	g_task_set_task_data (_data_->_async_result, _data_, gxml_xparser_real_read_stream_async_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (istream);
	_g_object_unref0 (_data_->istream);
	_data_->istream = _tmp1_;
	gxml_xparser_real_read_stream_async_co (_data_);
}

static void
gxml_xparser_read_stream_finish (GXmlParser* base,
                                 GAsyncResult* _res_,
                                 GError** error)
{
	GxmlXparserReadStreamAsyncData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static gboolean
_gxml_xparser_real_read_stream_async_co_gsource_func (gpointer self)
{
	gboolean result;
	result = gxml_xparser_real_read_stream_async_co (self);
	return result;
}

static gboolean
gxml_xparser_real_read_stream_async_co (GxmlXparserReadStreamAsyncData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = gxml_parser_get_cancellable ((GXmlParser*) _data_->self);
	_data_->_tmp1_ = _data_->_tmp0_;
	gxml_parser_set_cancellable ((GXmlParser*) _data_->self, _data_->_tmp1_);
	_data_->_tmp2_ = g_data_input_stream_new (_data_->istream);
	_g_object_unref0 (_data_->self->priv->tistream);
	_data_->self->priv->tistream = _data_->_tmp2_;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _gxml_xparser_real_read_stream_async_co_gsource_func, _data_, NULL);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	_data_->_tmp3_ = xmlReaderForIO (_gxml_xparser_read_callback_xml_input_read_callback, _gxml_xparser_close_callback_xml_input_close_callback, _data_->self, "", NULL, (gint) XML_PARSE_NOERROR);
	_xmlFreeTextReader0 (_data_->self->priv->tr);
	_data_->self->priv->tr = _data_->_tmp3_;
	_data_->_tmp4_ = _data_->self->priv->_node;
	g_object_freeze_notify ((GObject*) _data_->_tmp4_);
	_data_->_tmp5_ = _data_->self->priv->_node;
	gxml_xparser_read_node (_data_->self, _data_->_tmp5_, &_data_->_inner_error0_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp6_ = _data_->self->priv->_node;
	g_object_thaw_notify ((GObject*) _data_->_tmp6_);
	_xmlFreeTextReader0 (_data_->self->priv->tr);
	_data_->self->priv->tr = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!_data_->_task_complete_) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

/**
   * Reads a node using current parser.
   */
void
gxml_xparser_read_node (GXmlXParser* self,
                        GXmlDomNode* node,
                        GError** error)
{
	xmlTextReader* _tmp0_;
	gboolean _tmp14_ = FALSE;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (node != NULL);
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		GError* _tmp1_;
		_tmp1_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _ ("Internal Error: No TextReader was set"));
		_inner_error0_ = _tmp1_;
		g_propagate_error (error, _inner_error0_);
		return;
	}
	gxml_parser_move_next_node ((GXmlParser*) self, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return;
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_ELEMENT)) {
		while (TRUE) {
			gboolean _tmp2_ = FALSE;
			gboolean _tmp13_ = FALSE;
			if (gxml_parser_current_is_element ((GXmlParser*) self)) {
				gchar* _tmp3_;
				gchar* _tmp4_;
				gchar* _tmp5_;
				gchar* _tmp6_;
				gchar* _tmp7_;
				gchar* _tmp8_;
				gchar* _tmp9_;
				gchar* _tmp10_;
				gchar* _tmp11_;
				_tmp3_ = gxml_parser_current_node_name ((GXmlParser*) self);
				_tmp4_ = _tmp3_;
				_tmp5_ = g_utf8_strdown (_tmp4_, (gssize) -1);
				_tmp6_ = _tmp5_;
				_tmp7_ = gxml_dom_element_get_local_name (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) node) : NULL);
				_tmp8_ = _tmp7_;
				_tmp9_ = _tmp8_;
				_tmp10_ = g_utf8_strdown (_tmp9_, (gssize) -1);
				_tmp11_ = _tmp10_;
				_tmp2_ = g_strcmp0 (_tmp6_, _tmp11_) == 0;
				_g_free0 (_tmp11_);
				_g_free0 (_tmp9_);
				_g_free0 (_tmp6_);
				_g_free0 (_tmp4_);
			} else {
				_tmp2_ = FALSE;
			}
			if (_tmp2_) {
				break;
			}
			if (!gxml_parser_current_is_document ((GXmlParser*) self)) {
				GXmlDomDocument* _tmp12_;
				_tmp12_ = self->priv->_document;
				gxml_parser_read_child_node ((GXmlParser*) self, (GXmlDomNode*) _tmp12_, &_inner_error0_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					g_propagate_error (error, _inner_error0_);
					return;
				}
			}
			_tmp13_ = gxml_parser_move_next_node ((GXmlParser*) self, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				g_propagate_error (error, _inner_error0_);
				return;
			}
			if (!_tmp13_) {
				break;
			}
		}
		gxml_parser_read_element ((GXmlParser*) self, G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) node) : NULL, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_propagate_error (error, _inner_error0_);
			return;
		}
	}
	if (gxml_parser_current_is_element ((GXmlParser*) self)) {
		_tmp14_ = G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_DOCUMENT);
	} else {
		_tmp14_ = FALSE;
	}
	if (_tmp14_) {
		gxml_parser_read_child_element ((GXmlParser*) self, node, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_propagate_error (error, _inner_error0_);
			return;
		}
	} else {
		if (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_GOM_DOCUMENT)) {
			gxml_parser_read_child_nodes ((GXmlParser*) self, node, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				g_propagate_error (error, _inner_error0_);
				return;
			}
		}
		if (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_GOM_ELEMENT)) {
			gboolean _tmp15_;
			gboolean _tmp16_;
			_tmp15_ = gxml_gom_element_get_parse_children (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_GOM_ELEMENT) ? ((GXmlGomElement*) node) : NULL);
			_tmp16_ = _tmp15_;
			if (_tmp16_) {
				gxml_parser_read_child_nodes ((GXmlParser*) self, node, &_inner_error0_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					g_propagate_error (error, _inner_error0_);
					return;
				}
			} else {
				gchar* _tmp17_ = NULL;
				gchar* _tmp18_;
				_tmp18_ = gxml_parser_read_unparsed ((GXmlParser*) self, &_inner_error0_);
				_tmp17_ = _tmp18_;
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					g_propagate_error (error, _inner_error0_);
					return;
				}
				gxml_gom_element_set_unparsed (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_GOM_ELEMENT) ? ((GXmlGomElement*) node) : NULL, _tmp17_);
				gxml_parser_move_next_node ((GXmlParser*) self, &_inner_error0_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					g_propagate_error (error, _inner_error0_);
					_g_free0 (_tmp17_);
					return;
				}
				_g_free0 (_tmp17_);
			}
		}
	}
}

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

static void
gxml_xparser_read_child_nodes_stream_async_data_free (gpointer _data)
{
	GxmlXparserReadChildNodesStreamAsyncData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->istream);
	_g_object_unref0 (_data_->self);
	g_slice_free (GxmlXparserReadChildNodesStreamAsyncData, _data_);
}

static void
gxml_xparser_read_child_nodes_stream_async_async_ready_wrapper (GObject *source_object,
                                                                GAsyncResult *res,
                                                                void *user_data)
{
	GxmlXparserReadChildNodesStreamAsyncData* _task_data_;
	_task_data_ = g_task_get_task_data (G_TASK (res));
	if (_task_data_->_callback_ != NULL) {
		_task_data_->_callback_ (source_object, res, user_data);
	}
	_task_data_->_task_complete_ = TRUE;
}

void
gxml_xparser_read_child_nodes_stream_async (GXmlXParser* self,
                                            GInputStream* istream,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_)
{
	GxmlXparserReadChildNodesStreamAsyncData* _data_;
	GXmlXParser* _tmp0_;
	GInputStream* _tmp1_;
	_data_ = g_slice_new0 (GxmlXparserReadChildNodesStreamAsyncData);
	_data_->_callback_ = _callback_;
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, gxml_xparser_read_child_nodes_stream_async_async_ready_wrapper, _user_data_);
	if (_callback_ == NULL) {
		_data_->_task_complete_ = TRUE;
	}
	g_task_set_task_data (_data_->_async_result, _data_, gxml_xparser_read_child_nodes_stream_async_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (istream);
	_g_object_unref0 (_data_->istream);
	_data_->istream = _tmp1_;
	gxml_xparser_read_child_nodes_stream_async_co (_data_);
}

void
gxml_xparser_read_child_nodes_stream_finish (GXmlXParser* self,
                                             GAsyncResult* _res_,
                                             GError** error)
{
	GxmlXparserReadChildNodesStreamAsyncData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static gboolean
_gxml_xparser_read_child_nodes_stream_async_co_gsource_func (gpointer self)
{
	gboolean result;
	result = gxml_xparser_read_child_nodes_stream_async_co (self);
	return result;
}

static void
gxml_xparser_read_child_nodes_stream_async_ready (GObject* source_object,
                                                  GAsyncResult* _res_,
                                                  gpointer _user_data_)
{
	GxmlXparserReadChildNodesStreamAsyncData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_data_->_task_complete_ = TRUE;
	gxml_xparser_read_child_nodes_stream_async_co (_data_);
}

static gboolean
gxml_xparser_read_child_nodes_stream_async_co (GxmlXparserReadChildNodesStreamAsyncData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = (GMemoryOutputStream*) g_memory_output_stream_new_resizable ();
	_data_->b = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->b;
	g_output_stream_splice ((GOutputStream*) _data_->_tmp1_, _data_->istream, 0, NULL, &_data_->_inner_error0_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_g_object_unref0 (_data_->b);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _gxml_xparser_read_child_nodes_stream_async_co_gsource_func, _data_, NULL);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	_data_->_tmp2_ = _data_->b;
	_data_->_tmp3_ = g_memory_output_stream_get_data (_data_->_tmp2_);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = _data_->b;
	_data_->_tmp6_ = xmlReaderForMemory ((gchar*) _data_->_tmp4_, (gint) g_memory_output_stream_get_data_size (_data_->_tmp5_), "/gxml_memory", NULL, 0);
	_xmlFreeTextReader0 (_data_->self->priv->tr);
	_data_->self->priv->tr = _data_->_tmp6_;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _gxml_xparser_read_child_nodes_stream_async_co_gsource_func, _data_, NULL);
	_data_->_state_ = 2;
	return FALSE;
	_state_2:
	;
	_data_->_tmp7_ = _data_->self->priv->_node;
	_data_->_state_ = 3;
	gxml_parser_read_child_nodes_async ((GXmlParser*) _data_->self, _data_->_tmp7_, gxml_xparser_read_child_nodes_stream_async_ready, _data_);
	return FALSE;
	_state_3:
	gxml_parser_read_child_nodes_finish ((GXmlParser*) _data_->self, _data_->_res_, &_data_->_inner_error0_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_g_object_unref0 (_data_->b);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_xmlFreeTextReader0 (_data_->self->priv->tr);
	_data_->self->priv->tr = NULL;
	_g_object_unref0 (_data_->b);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!_data_->_task_complete_) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

/**
   * Reads all child nodes as string
   */
static gchar*
gxml_xparser_real_read_unparsed (GXmlParser* base,
                                 GError** error)
{
	GXmlXParser * self;
	gchar* result = NULL;
	xmlTextReader* _tmp0_;
	gchar* s = NULL;
	xmlTextReader* _tmp2_;
	gchar* _tmp3_;
	GError* _inner_error0_ = NULL;
	self = (GXmlXParser*) base;
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		GError* _tmp1_;
		_tmp1_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _ ("Internal Error: No TextReader was set"));
		_inner_error0_ = _tmp1_;
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	_tmp2_ = self->priv->tr;
	_tmp3_ = (gchar*) xmlTextReaderReadInnerXml (_tmp2_);
	s = _tmp3_;
	result = s;
	return result;
}

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

/**
   * Check if current node has childs.
   */
static gboolean
gxml_xparser_real_current_is_empty_element (GXmlParser* base)
{
	GXmlXParser * self;
	gboolean result = FALSE;
	xmlTextReader* _tmp0_;
	xmlTextReader* _tmp1_;
	self = (GXmlXParser*) base;
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp1_ = self->priv->tr;
	result = xmlTextReaderIsEmptyElement (_tmp1_) == 1;
	return result;
}

/**
   * Check if current node found by parser, is a {@link DomElement}
   */
static gboolean
gxml_xparser_real_current_is_element (GXmlParser* base)
{
	GXmlXParser * self;
	gboolean result = FALSE;
	xmlTextReader* _tmp0_;
	xmlTextReader* _tmp1_;
	self = (GXmlXParser*) base;
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp1_ = self->priv->tr;
	result = xmlTextReaderNodeType (_tmp1_) == ((gint) XML_READER_TYPE_ELEMENT);
	return result;
}

/**
   * Check if current node found by parser, is a {@link DomDocument}
   */
static gboolean
gxml_xparser_real_current_is_document (GXmlParser* base)
{
	GXmlXParser * self;
	gboolean result = FALSE;
	xmlTextReader* _tmp0_;
	xmlTextReader* _tmp1_;
	self = (GXmlXParser*) base;
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp1_ = self->priv->tr;
	result = xmlTextReaderNodeType (_tmp1_) == ((gint) XML_READER_TYPE_DOCUMENT);
	return result;
}

/**
   * Returns current node's local name, found by parser.
   */
static gchar*
gxml_xparser_real_current_node_name (GXmlParser* base)
{
	GXmlXParser * self;
	gchar* result = NULL;
	xmlTextReader* _tmp0_;
	xmlTextReader* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	self = (GXmlXParser*) base;
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("");
		result = _tmp1_;
		return result;
	}
	_tmp2_ = self->priv->tr;
	_tmp3_ = (const gchar*) xmlTextReaderConstLocalName (_tmp2_);
	_tmp4_ = g_strdup (_tmp3_);
	result = _tmp4_;
	return result;
}

/**
   * Creates a new {@link DomElement} and append it as a child of parent.
   *

   * It should set current namespace, taking care about set namespace prefix.
   */
static GXmlDomElement*
gxml_xparser_real_create_element (GXmlParser* base,
                                  GXmlDomNode* parent,
                                  GError** error)
{
	GXmlXParser * self;
	GXmlDomElement* result = NULL;
	xmlTextReader* _tmp0_;
	GXmlDomElement* n = NULL;
	gchar* prefix = NULL;
	xmlTextReader* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	GXmlDomElement* _tmp29_;
	GXmlDomNode* _tmp30_;
	GXmlDomNode* _tmp31_;
	GError* _inner_error0_ = NULL;
	self = (GXmlXParser*) base;
	g_return_val_if_fail (parent != NULL, NULL);
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		GError* _tmp1_;
		_tmp1_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _ ("Internal Error: No TextReader was set"));
		_inner_error0_ = _tmp1_;
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	n = NULL;
	_tmp2_ = self->priv->tr;
	_tmp3_ = (gchar*) xmlTextReaderPrefix (_tmp2_);
	prefix = _tmp3_;
	_tmp4_ = prefix;
	if (_tmp4_ != NULL) {
		gchar* nsuri = NULL;
		xmlTextReader* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		GXmlDomElement* _tmp8_ = NULL;
		GXmlDomDocument* _tmp9_;
		const gchar* _tmp10_;
		xmlTextReader* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		xmlTextReader* _tmp16_;
		const gchar* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		GXmlDomElement* _tmp20_;
		GXmlDomElement* _tmp21_;
		GXmlDomElement* _tmp22_;
		_tmp5_ = self->priv->tr;
		_tmp6_ = prefix;
		_tmp7_ = (gchar*) xmlTextReaderLookupNamespace (_tmp5_, (xmlChar*) _tmp6_);
		nsuri = _tmp7_;
		_tmp9_ = self->priv->_document;
		_tmp10_ = nsuri;
		_tmp11_ = self->priv->tr;
		_tmp12_ = (gchar*) xmlTextReaderPrefix (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = g_strconcat (_tmp13_, ":", NULL);
		_tmp15_ = _tmp14_;
		_tmp16_ = self->priv->tr;
		_tmp17_ = (const gchar*) xmlTextReaderConstLocalName (_tmp16_);
		_tmp18_ = g_strconcat (_tmp15_, _tmp17_, NULL);
		_tmp19_ = _tmp18_;
		_tmp20_ = gxml_dom_document_create_element_ns (_tmp9_, _tmp10_, _tmp19_, &_inner_error0_);
		_tmp21_ = _tmp20_;
		_g_free0 (_tmp19_);
		_g_free0 (_tmp15_);
		_g_free0 (_tmp13_);
		_tmp8_ = _tmp21_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_propagate_error (error, _inner_error0_);
			_g_free0 (nsuri);
			_g_free0 (prefix);
			_g_object_unref0 (n);
			return NULL;
		}
		_tmp22_ = _tmp8_;
		_tmp8_ = NULL;
		_g_object_unref0 (n);
		n = _tmp22_;
		_g_object_unref0 (_tmp8_);
		_g_free0 (nsuri);
	} else {
		GXmlDomElement* _tmp23_ = NULL;
		GXmlDomDocument* _tmp24_;
		xmlTextReader* _tmp25_;
		const gchar* _tmp26_;
		GXmlDomElement* _tmp27_;
		GXmlDomElement* _tmp28_;
		_tmp24_ = self->priv->_document;
		_tmp25_ = self->priv->tr;
		_tmp26_ = (const gchar*) xmlTextReaderConstLocalName (_tmp25_);
		_tmp27_ = gxml_dom_document_create_element (_tmp24_, _tmp26_, &_inner_error0_);
		_tmp23_ = _tmp27_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_propagate_error (error, _inner_error0_);
			_g_free0 (prefix);
			_g_object_unref0 (n);
			return NULL;
		}
		_tmp28_ = _tmp23_;
		_tmp23_ = NULL;
		_g_object_unref0 (n);
		n = _tmp28_;
		_g_object_unref0 (_tmp23_);
	}
	_tmp29_ = n;
	_tmp30_ = gxml_dom_node_append_child (parent, (GXmlDomNode*) _tmp29_, &_inner_error0_);
	_tmp31_ = _tmp30_;
	_g_object_unref0 (_tmp31_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_g_free0 (prefix);
		_g_object_unref0 (n);
		return NULL;
	}
	result = n;
	_g_free0 (prefix);
	return result;
}

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

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

static gchar*
string_chomp (const gchar* self)
{
	gchar* result = NULL;
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	g_strchomp (_tmp1_);
	result = _result_;
	return result;
}

static gchar*
string_strip (const gchar* self)
{
	gchar* result = NULL;
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	g_strstrip (_tmp1_);
	result = _result_;
	return result;
}

static gboolean
gxml_xparser_real_read_child_node (GXmlParser* base,
                                   GXmlDomNode* parent,
                                   GError** error)
{
	GXmlXParser * self;
	gboolean result = FALSE;
	xmlTextReader* _tmp0_;
	GXmlDomNode* n = NULL;
	gboolean ret = FALSE;
	gint t = 0;
	xmlTextReader* _tmp3_;
	GError* _inner_error0_ = NULL;
	self = (GXmlXParser*) base;
	g_return_val_if_fail (parent != NULL, FALSE);
	_tmp0_ = self->priv->tr;
	if (_tmp0_ == NULL) {
		GError* _tmp1_;
		gboolean _tmp2_ = FALSE;
		_tmp1_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _ ("Internal Error: No TextReader was set"));
		_inner_error0_ = _tmp1_;
		g_propagate_error (error, _inner_error0_);
		return _tmp2_;
	}
	n = NULL;
	ret = TRUE;
	_tmp3_ = self->priv->tr;
	t = xmlTextReaderNodeType (_tmp3_);
	switch (t) {
		case XML_READER_TYPE_NONE:
		{
			gxml_parser_move_next_node ((GXmlParser*) self, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				gboolean _tmp4_ = FALSE;
				g_propagate_error (error, _inner_error0_);
				_g_object_unref0 (n);
				return _tmp4_;
			}
			break;
		}
		case XML_READER_TYPE_ATTRIBUTE:
		{
			break;
		}
		case XML_READER_TYPE_TEXT:
		{
			gchar* txtval = NULL;
			xmlTextReader* _tmp5_;
			gchar* _tmp6_;
			_tmp5_ = self->priv->tr;
			_tmp6_ = (gchar*) xmlTextReaderReadString (_tmp5_);
			txtval = _tmp6_;
			if (!G_TYPE_CHECK_INSTANCE_TYPE (parent, GXML_TYPE_DOM_DOCUMENT)) {
				GXmlDomText* _tmp7_ = NULL;
				GXmlDomDocument* _tmp8_;
				const gchar* _tmp9_;
				GXmlDomText* _tmp10_;
				GXmlDomText* _tmp12_;
				GXmlDomNode* _tmp13_;
				GXmlDomNode* _tmp14_;
				GXmlDomNode* _tmp15_;
				_tmp8_ = self->priv->_document;
				_tmp9_ = txtval;
				_tmp10_ = gxml_dom_document_create_text_node (_tmp8_, _tmp9_, &_inner_error0_);
				_tmp7_ = _tmp10_;
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					gboolean _tmp11_ = FALSE;
					g_propagate_error (error, _inner_error0_);
					_g_free0 (txtval);
					_g_object_unref0 (n);
					return _tmp11_;
				}
				_tmp12_ = _tmp7_;
				_tmp7_ = NULL;
				_g_object_unref0 (n);
				n = (GXmlDomNode*) _tmp12_;
				_tmp13_ = n;
				_tmp14_ = gxml_dom_node_append_child (parent, _tmp13_, &_inner_error0_);
				_tmp15_ = _tmp14_;
				_g_object_unref0 (_tmp15_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					gboolean _tmp16_ = FALSE;
					g_propagate_error (error, _inner_error0_);
					_g_object_unref0 (_tmp7_);
					_g_free0 (txtval);
					_g_object_unref0 (n);
					return _tmp16_;
				}
				_g_object_unref0 (_tmp7_);
			}
			_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* _tmp17_;
			const gchar* _tmp18_;
			gchar* _tmp19_;
			gchar* pival = NULL;
			xmlTextReader* _tmp20_;
			gchar* _tmp21_;
			GXmlDomProcessingInstruction* _tmp22_ = NULL;
			GXmlDomDocument* _tmp23_;
			const gchar* _tmp24_;
			const gchar* _tmp25_;
			GXmlDomProcessingInstruction* _tmp26_;
			GXmlDomProcessingInstruction* _tmp28_;
			GXmlDomNode* _tmp29_;
			GXmlDomNode* _tmp30_;
			GXmlDomNode* _tmp31_;
			_tmp17_ = self->priv->tr;
			_tmp18_ = (const gchar*) xmlTextReaderConstLocalName (_tmp17_);
			_tmp19_ = g_strdup (_tmp18_);
			pit = _tmp19_;
			_tmp20_ = self->priv->tr;
			_tmp21_ = (gchar*) xmlTextReaderValue (_tmp20_);
			pival = _tmp21_;
			_tmp23_ = self->priv->_document;
			_tmp24_ = pit;
			_tmp25_ = pival;
			_tmp26_ = gxml_dom_document_create_processing_instruction (_tmp23_, _tmp24_, _tmp25_, &_inner_error0_);
			_tmp22_ = _tmp26_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				gboolean _tmp27_ = FALSE;
				g_propagate_error (error, _inner_error0_);
				_g_free0 (pival);
				_g_free0 (pit);
				_g_object_unref0 (n);
				return _tmp27_;
			}
			_tmp28_ = _tmp22_;
			_tmp22_ = NULL;
			_g_object_unref0 (n);
			n = (GXmlDomNode*) _tmp28_;
			_tmp29_ = n;
			_tmp30_ = gxml_dom_node_append_child (parent, _tmp29_, &_inner_error0_);
			_tmp31_ = _tmp30_;
			_g_object_unref0 (_tmp31_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				gboolean _tmp32_ = FALSE;
				g_propagate_error (error, _inner_error0_);
				_g_object_unref0 (_tmp22_);
				_g_free0 (pival);
				_g_free0 (pit);
				_g_object_unref0 (n);
				return _tmp32_;
			}
			_g_object_unref0 (_tmp22_);
			_g_free0 (pival);
			_g_free0 (pit);
			break;
		}
		case XML_READER_TYPE_COMMENT:
		{
			gchar* commval = NULL;
			xmlTextReader* _tmp33_;
			gchar* _tmp34_;
			GXmlDomComment* _tmp35_ = NULL;
			GXmlDomDocument* _tmp36_;
			const gchar* _tmp37_;
			GXmlDomComment* _tmp38_;
			GXmlDomComment* _tmp40_;
			GXmlDomNode* _tmp41_;
			GXmlDomNode* _tmp42_;
			GXmlDomNode* _tmp43_;
			_tmp33_ = self->priv->tr;
			_tmp34_ = (gchar*) xmlTextReaderValue (_tmp33_);
			commval = _tmp34_;
			_tmp36_ = self->priv->_document;
			_tmp37_ = commval;
			_tmp38_ = gxml_dom_document_create_comment (_tmp36_, _tmp37_, &_inner_error0_);
			_tmp35_ = _tmp38_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				gboolean _tmp39_ = FALSE;
				g_propagate_error (error, _inner_error0_);
				_g_free0 (commval);
				_g_object_unref0 (n);
				return _tmp39_;
			}
			_tmp40_ = _tmp35_;
			_tmp35_ = NULL;
			_g_object_unref0 (n);
			n = (GXmlDomNode*) _tmp40_;
			_tmp41_ = n;
			_tmp42_ = gxml_dom_node_append_child (parent, _tmp41_, &_inner_error0_);
			_tmp43_ = _tmp42_;
			_g_object_unref0 (_tmp43_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				gboolean _tmp44_ = FALSE;
				g_propagate_error (error, _inner_error0_);
				_g_object_unref0 (_tmp35_);
				_g_free0 (commval);
				_g_object_unref0 (n);
				return _tmp44_;
			}
			_g_object_unref0 (_tmp35_);
			_g_free0 (commval);
			break;
		}
		case XML_READER_TYPE_DOCUMENT:
		{
			ret = FALSE;
			break;
		}
		case XML_READER_TYPE_DOCUMENT_TYPE:
		{
			xmlBuffer* bf = NULL;
			xmlBuffer* _tmp45_;
			xmlNode* xn = NULL;
			xmlTextReader* _tmp46_;
			xmlNode* _tmp47_;
			xmlBuffer* _tmp48_;
			xmlNode* _tmp49_;
			xmlDoc* _tmp50_;
			xmlNode* _tmp51_;
			gchar* sids = NULL;
			xmlBuffer* _tmp52_;
			const gchar* _tmp53_;
			gchar* _tmp54_;
			GRegex* reg = NULL;
			GRegex* _tmp55_;
			GMatchInfo* info = NULL;
			GRegex* _tmp57_;
			const gchar* _tmp58_;
			GMatchInfo* _tmp59_ = NULL;
			gboolean _tmp60_;
			gchar* pid = NULL;
			GMatchInfo* _tmp64_;
			gchar* _tmp65_;
			const gchar* _tmp66_;
			gchar* sid = NULL;
			GMatchInfo* _tmp73_;
			gchar* _tmp74_;
			const gchar* _tmp75_;
			GXmlDomDocument* _tmp82_;
			xmlTextReader* _tmp83_;
			const gchar* _tmp84_;
			const gchar* _tmp85_;
			const gchar* _tmp86_;
			GXmlGomDocumentType* _tmp87_;
			GXmlDomNode* _tmp88_;
			GXmlDomNode* _tmp89_;
			GXmlDomNode* _tmp90_;
			_tmp45_ = xmlBufferCreate ();
			bf = _tmp45_;
			_tmp46_ = self->priv->tr;
			_tmp47_ = xmlTextReaderCurrentNode (_tmp46_);
			xn = _tmp47_;
			_tmp48_ = bf;
			_tmp49_ = xn;
			_tmp50_ = _tmp49_->doc;
			_tmp51_ = xn;
			xmlNodeDump (_tmp48_, _tmp50_, _tmp51_, 0, 0);
			_tmp52_ = bf;
			_tmp53_ = xmlBufferContent (_tmp52_);
			_tmp54_ = g_strdup (_tmp53_);
			sids = _tmp54_;
			_tmp55_ = g_regex_new ("^<!DOCTYPE\\s*((([a-z]*|[A-Z]*))|(([a-z]*|[A-Z]*)\\s*PUBLIC\\s*(?<pid>" \
" \".*\")\\s*(?<sid> \".*\")))\\s*>", 0, 0, &_inner_error0_);
			reg = _tmp55_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				gboolean _tmp56_ = FALSE;
				g_propagate_error (error, _inner_error0_);
				_g_free0 (sids);
				_xmlBufferFree0 (bf);
				_g_object_unref0 (n);
				return _tmp56_;
			}
			info = NULL;
			_tmp57_ = reg;
			_tmp58_ = sids;
			_tmp60_ = g_regex_match (_tmp57_, _tmp58_, G_REGEX_MATCH_ANCHORED, &_tmp59_);
			_g_match_info_unref0 (info);
			info = _tmp59_;
			if (!_tmp60_) {
				const gchar* _tmp61_;
				gchar* _tmp62_;
				gchar* _tmp63_;
				_tmp61_ = sids;
				_tmp62_ = g_strconcat ("Invalid sequence for document type definition: ", _tmp61_, NULL);
				_tmp63_ = _tmp62_;
				g_warning ("XParser.vala:412: %s", _ (_tmp63_));
				_g_free0 (_tmp63_);
				result = FALSE;
				_g_match_info_unref0 (info);
				_g_regex_unref0 (reg);
				_g_free0 (sids);
				_xmlBufferFree0 (bf);
				_g_object_unref0 (n);
				return result;
			}
			_tmp64_ = info;
			_tmp65_ = g_match_info_fetch_named (_tmp64_, "pid");
			pid = _tmp65_;
			_tmp66_ = pid;
			if (_tmp66_ != NULL) {
				const gchar* _tmp67_;
				gchar* _tmp68_;
				gchar* _tmp69_;
				gchar* _tmp70_;
				gchar* _tmp71_;
				gchar* _tmp72_;
				_tmp67_ = pid;
				_tmp68_ = string_replace (_tmp67_, "\"", "");
				_tmp69_ = _tmp68_;
				_tmp70_ = string_chomp (_tmp69_);
				_tmp71_ = _tmp70_;
				_tmp72_ = string_strip (_tmp71_);
				_g_free0 (pid);
				pid = _tmp72_;
				_g_free0 (_tmp71_);
				_g_free0 (_tmp69_);
			}
			_tmp73_ = info;
			_tmp74_ = g_match_info_fetch_named (_tmp73_, "sid");
			sid = _tmp74_;
			_tmp75_ = sid;
			if (_tmp75_ != NULL) {
				const gchar* _tmp76_;
				gchar* _tmp77_;
				gchar* _tmp78_;
				gchar* _tmp79_;
				gchar* _tmp80_;
				gchar* _tmp81_;
				_tmp76_ = sid;
				_tmp77_ = string_replace (_tmp76_, "\"", "");
				_tmp78_ = _tmp77_;
				_tmp79_ = string_chomp (_tmp78_);
				_tmp80_ = _tmp79_;
				_tmp81_ = string_strip (_tmp80_);
				_g_free0 (sid);
				sid = _tmp81_;
				_g_free0 (_tmp80_);
				_g_free0 (_tmp78_);
			}
			_tmp82_ = self->priv->_document;
			_tmp83_ = self->priv->tr;
			_tmp84_ = (const gchar*) xmlTextReaderConstLocalName (_tmp83_);
			_tmp85_ = pid;
			_tmp86_ = sid;
			_tmp87_ = gxml_gom_document_type_new (_tmp82_, _tmp84_, _tmp85_, _tmp86_);
			_g_object_unref0 (n);
			n = (GXmlDomNode*) _tmp87_;
			_tmp88_ = n;
			_tmp89_ = gxml_dom_node_append_child (parent, _tmp88_, &_inner_error0_);
			_tmp90_ = _tmp89_;
			_g_object_unref0 (_tmp90_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				gboolean _tmp91_ = FALSE;
				g_propagate_error (error, _inner_error0_);
				_g_free0 (sid);
				_g_free0 (pid);
				_g_match_info_unref0 (info);
				_g_regex_unref0 (reg);
				_g_free0 (sids);
				_xmlBufferFree0 (bf);
				_g_object_unref0 (n);
				return _tmp91_;
			}
			_g_free0 (sid);
			_g_free0 (pid);
			_g_match_info_unref0 (info);
			_g_regex_unref0 (reg);
			_g_free0 (sids);
			_xmlBufferFree0 (bf);
			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* _tmp92_;
			gchar* _tmp93_;
			_tmp92_ = self->priv->tr;
			_tmp93_ = (gchar*) xmlTextReaderReadString (_tmp92_);
			stxtval = _tmp93_;
			if (!G_TYPE_CHECK_INSTANCE_TYPE (parent, GXML_TYPE_DOM_DOCUMENT)) {
				GXmlDomText* _tmp94_ = NULL;
				GXmlDomDocument* _tmp95_;
				const gchar* _tmp96_;
				GXmlDomText* _tmp97_;
				GXmlDomText* _tmp99_;
				GXmlDomNode* _tmp100_;
				GXmlDomNode* _tmp101_;
				GXmlDomNode* _tmp102_;
				_tmp95_ = self->priv->_document;
				_tmp96_ = stxtval;
				_tmp97_ = gxml_dom_document_create_text_node (_tmp95_, _tmp96_, &_inner_error0_);
				_tmp94_ = _tmp97_;
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					gboolean _tmp98_ = FALSE;
					g_propagate_error (error, _inner_error0_);
					_g_free0 (stxtval);
					_g_object_unref0 (n);
					return _tmp98_;
				}
				_tmp99_ = _tmp94_;
				_tmp94_ = NULL;
				_g_object_unref0 (n);
				n = (GXmlDomNode*) _tmp99_;
				_tmp100_ = n;
				_tmp101_ = gxml_dom_node_append_child (parent, _tmp100_, &_inner_error0_);
				_tmp102_ = _tmp101_;
				_g_object_unref0 (_tmp102_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					gboolean _tmp103_ = FALSE;
					g_propagate_error (error, _inner_error0_);
					_g_object_unref0 (_tmp94_);
					_g_free0 (stxtval);
					_g_object_unref0 (n);
					return _tmp103_;
				}
				_g_object_unref0 (_tmp94_);
			}
			_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;
}

static gchar*
gxml_xparser_dump (GXmlXParser* self,
                   GError** error)
{
	gchar* result = NULL;
	gint size = 0;
	xmlDoc* doc = NULL;
	xmlTextWriter* _tmp0_;
	GXmlDomNode* _tmp1_;
	xmlTextWriter* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	GXmlDomNode* _tmp6_;
	GXmlDomNode* _tmp14_;
	xmlTextWriter* _tmp15_;
	xmlTextWriter* _tmp16_;
	xmlTextWriter* _tmp17_;
	gchar* str = NULL;
	xmlDoc* _tmp18_;
	gchar* _tmp19_ = NULL;
	gint _tmp20_ = 0;
	GError* _inner_error0_ = 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_;
		_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_;
		GXmlDomNode* _tmp8_;
		GXmlDomElement* _tmp9_;
		GXmlDomElement* _tmp10_;
		GXmlDomElement* _tmp11_;
		gboolean _tmp12_;
		_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_;
			_tmp13_ = self->priv->tw;
			xmlTextWriterEndDocument (_tmp13_);
		}
	}
	_tmp14_ = self->priv->_node;
	gxml_xparser_start_node (self, _tmp14_, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_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 gpointer
_g_param_spec_ref0 (gpointer self)
{
	return self ? g_param_spec_ref (self) : NULL;
}

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

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

static inline void
_g_list_free__g_param_spec_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_param_spec_unref0_);
}

static void
gxml_xparser_start_node (GXmlXParser* self,
                         GXmlDomNode* node,
                         GError** error)
{
	xmlTextWriter* _tmp0_;
	gint size = 0;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (node != NULL);
	_tmp0_ = self->priv->tw;
	if (_tmp0_ == NULL) {
		GError* _tmp1_;
		_tmp1_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _ ("Internal Error: No TextWriter initialized"));
		_inner_error0_ = _tmp1_;
		g_propagate_error (error, _inner_error0_);
		return;
	}
	size = 0;
	if (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_ELEMENT)) {
		gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		gboolean _tmp5_;
		GList* lp = NULL;
		GList* _tmp41_;
		GList* _tmp42_;
		GeeSet* keys = NULL;
		GXmlDomNamedNodeMap* _tmp66_;
		GXmlDomNamedNodeMap* _tmp67_;
		GXmlDomNamedNodeMap* _tmp68_;
		GeeSet* _tmp69_;
		GeeSet* _tmp70_;
		GeeSet* _tmp71_;
		_tmp2_ = gxml_dom_element_get_namespace_uri (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) node) : NULL);
		_tmp3_ = _tmp2_;
		_tmp4_ = _tmp3_;
		_tmp5_ = _tmp4_ != NULL;
		_g_free0 (_tmp4_);
		if (_tmp5_) {
			gchar* lpns = NULL;
			GXmlDomNode* _tmp6_;
			GXmlDomNode* _tmp7_;
			GXmlDomNode* _tmp8_;
			gchar* _tmp9_;
			gchar* _tmp10_;
			gchar* _tmp11_;
			gchar* _tmp12_;
			gchar* _tmp13_;
			gboolean _tmp14_ = FALSE;
			const gchar* _tmp15_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			gchar* _tmp18_;
			gboolean _tmp19_;
			_tmp6_ = gxml_dom_node_get_parent_node (node);
			_tmp7_ = _tmp6_;
			_tmp8_ = _tmp7_;
			_tmp9_ = gxml_dom_element_get_namespace_uri (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) node) : NULL);
			_tmp10_ = _tmp9_;
			_tmp11_ = _tmp10_;
			_tmp12_ = gxml_dom_node_lookup_prefix (_tmp8_, _tmp11_);
			_tmp13_ = _tmp12_;
			_g_free0 (_tmp11_);
			_g_object_unref0 (_tmp8_);
			lpns = _tmp13_;
			_tmp15_ = lpns;
			_tmp16_ = gxml_dom_element_get_prefix (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) node) : NULL);
			_tmp17_ = _tmp16_;
			_tmp18_ = _tmp17_;
			_tmp19_ = g_strcmp0 (_tmp15_, _tmp18_) == 0;
			_g_free0 (_tmp18_);
			if (_tmp19_) {
				gchar* _tmp20_;
				gchar* _tmp21_;
				gchar* _tmp22_;
				_tmp20_ = gxml_dom_element_get_prefix (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) node) : NULL);
				_tmp21_ = _tmp20_;
				_tmp22_ = _tmp21_;
				_tmp14_ = _tmp22_ != NULL;
				_g_free0 (_tmp22_);
			} else {
				_tmp14_ = FALSE;
			}
			if (_tmp14_) {
				xmlTextWriter* _tmp23_;
				gchar* _tmp24_;
				gchar* _tmp25_;
				gchar* _tmp26_;
				_tmp23_ = self->priv->tw;
				_tmp24_ = gxml_dom_node_get_node_name (node);
				_tmp25_ = _tmp24_;
				_tmp26_ = _tmp25_;
				xmlTextWriterStartElement (_tmp23_, (xmlChar*) _tmp26_);
				_g_free0 (_tmp26_);
			} else {
				xmlTextWriter* _tmp27_;
				gchar* _tmp28_;
				gchar* _tmp29_;
				gchar* _tmp30_;
				gchar* _tmp31_;
				gchar* _tmp32_;
				gchar* _tmp33_;
				gchar* _tmp34_;
				gchar* _tmp35_;
				gchar* _tmp36_;
				_tmp27_ = self->priv->tw;
				_tmp28_ = gxml_dom_element_get_prefix (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) node) : NULL);
				_tmp29_ = _tmp28_;
				_tmp30_ = _tmp29_;
				_tmp31_ = gxml_dom_element_get_local_name (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) node) : NULL);
				_tmp32_ = _tmp31_;
				_tmp33_ = _tmp32_;
				_tmp34_ = gxml_dom_element_get_namespace_uri (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) node) : NULL);
				_tmp35_ = _tmp34_;
				_tmp36_ = _tmp35_;
				xmlTextWriterStartElementNS (_tmp27_, (xmlChar*) _tmp30_, (xmlChar*) _tmp33_, (xmlChar*) _tmp36_);
				_g_free0 (_tmp36_);
				_g_free0 (_tmp33_);
				_g_free0 (_tmp30_);
			}
			_g_free0 (lpns);
		} else {
			xmlTextWriter* _tmp37_;
			gchar* _tmp38_;
			gchar* _tmp39_;
			gchar* _tmp40_;
			_tmp37_ = self->priv->tw;
			_tmp38_ = gxml_dom_element_get_local_name (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) node) : NULL);
			_tmp39_ = _tmp38_;
			_tmp40_ = _tmp39_;
			xmlTextWriterStartElement (_tmp37_, (xmlChar*) _tmp40_);
			_g_free0 (_tmp40_);
		}
		_tmp41_ = gxml_gom_object_get_properties_list (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_GOM_OBJECT) ? ((GXmlGomObject*) node) : NULL);
		lp = _tmp41_;
		_tmp42_ = lp;
		{
			GList* pspec_collection = NULL;
			GList* pspec_it = NULL;
			pspec_collection = _tmp42_;
			for (pspec_it = pspec_collection; pspec_it != NULL; pspec_it = pspec_it->next) {
				GParamSpec* _tmp43_;
				GParamSpec* pspec = NULL;
				_tmp43_ = _g_param_spec_ref0 ((GParamSpec*) pspec_it->data);
				pspec = _tmp43_;
				{
					gchar* attname = NULL;
					GParamSpec* _tmp44_;
					const gchar* _tmp45_;
					gchar* _tmp46_;
					gchar* val = NULL;
					GParamSpec* _tmp47_;
					const gchar* _tmp60_;
					xmlTextWriter* _tmp61_;
					const gchar* _tmp62_;
					const gchar* _tmp63_;
					xmlTextWriter* _tmp64_;
					_tmp44_ = pspec;
					_tmp45_ = g_param_spec_get_nick (_tmp44_);
					_tmp46_ = string_replace (_tmp45_, "::", "");
					attname = _tmp46_;
					val = NULL;
					_tmp47_ = pspec;
					if (g_type_is_a (_tmp47_->value_type, GXML_TYPE_GOM_PROPERTY)) {
						GValue v = {0};
						GParamSpec* _tmp48_;
						GValue _tmp49_ = {0};
						GParamSpec* _tmp50_;
						const gchar* _tmp51_;
						GXmlGomProperty* gp = NULL;
						GObject* _tmp52_;
						GXmlGomProperty* _tmp53_;
						GXmlGomProperty* _tmp54_;
						GXmlGomProperty* _tmp55_;
						gchar* _tmp56_;
						gchar* _tmp57_;
						_tmp48_ = pspec;
						g_value_init (&_tmp49_, _tmp48_->value_type);
						v = _tmp49_;
						_tmp50_ = pspec;
						_tmp51_ = _tmp50_->name;
						g_object_get_property ((GObject*) node, _tmp51_, &v);
						_tmp52_ = g_value_get_object (&v);
						_tmp53_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp52_, GXML_TYPE_GOM_PROPERTY) ? ((GXmlGomProperty*) _tmp52_) : NULL);
						gp = _tmp53_;
						_tmp54_ = gp;
						if (_tmp54_ == 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;
						}
						_tmp55_ = gp;
						_tmp56_ = gxml_gom_property_get_value (_tmp55_);
						_tmp57_ = _tmp56_;
						_g_free0 (val);
						val = _tmp57_;
						_g_object_unref0 (gp);
						G_IS_VALUE (&v) ? (g_value_unset (&v), NULL) : NULL;
					} else {
						GParamSpec* _tmp58_;
						gchar* _tmp59_;
						_tmp58_ = pspec;
						_tmp59_ = gxml_gom_object_get_property_string (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_GOM_OBJECT) ? ((GXmlGomObject*) node) : NULL, _tmp58_);
						_g_free0 (val);
						val = _tmp59_;
					}
					_tmp60_ = val;
					if (_tmp60_ == NULL) {
						_g_free0 (val);
						_g_free0 (attname);
						_g_param_spec_unref0 (pspec);
						continue;
					}
					_tmp61_ = self->priv->tw;
					_tmp62_ = attname;
					_tmp63_ = val;
					size = size + xmlTextWriterWriteAttribute (_tmp61_, (xmlChar*) _tmp62_, (xmlChar*) _tmp63_);
					_tmp64_ = self->priv->tw;
					size = size + xmlTextWriterEndAttribute (_tmp64_);
					if (size > 1500) {
						xmlTextWriter* _tmp65_;
						_tmp65_ = self->priv->tw;
						xmlTextWriterFlush (_tmp65_);
					}
					_g_free0 (val);
					_g_free0 (attname);
					_g_param_spec_unref0 (pspec);
				}
			}
		}
		_tmp66_ = gxml_dom_element_get_attributes (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) node) : NULL);
		_tmp67_ = _tmp66_;
		_tmp68_ = _tmp67_;
		_tmp69_ = gee_map_get_keys ((GeeMap*) _tmp68_);
		_tmp70_ = _tmp69_;
		_tmp71_ = _tmp70_;
		_g_object_unref0 (_tmp68_);
		keys = _tmp71_;
		{
			GeeIterator* _ak_it = NULL;
			GeeSet* _tmp72_;
			GeeIterator* _tmp73_;
			_tmp72_ = keys;
			_tmp73_ = gee_iterable_iterator ((GeeIterable*) _tmp72_);
			_ak_it = _tmp73_;
			while (TRUE) {
				GeeIterator* _tmp74_;
				gchar* ak = NULL;
				GeeIterator* _tmp75_;
				gpointer _tmp76_;
				GXmlGomAttr* prop = NULL;
				GXmlDomNamedNodeMap* _tmp77_;
				GXmlDomNamedNodeMap* _tmp78_;
				GXmlDomNamedNodeMap* _tmp79_;
				const gchar* _tmp80_;
				gpointer _tmp81_;
				GXmlDomNode* _tmp82_;
				GXmlGomAttr* _tmp83_;
				GXmlGomAttr* _tmp84_;
				GXmlGomAttr* _tmp85_;
				GXmlGomAttr* _tmp86_;
				gboolean _tmp87_;
				gboolean _tmp88_;
				gchar* v = NULL;
				GXmlGomAttr* _tmp89_;
				gchar* _tmp90_;
				gchar* _tmp91_;
				const gchar* _tmp92_;
				const gchar* _tmp93_;
				xmlTextWriter* _tmp111_;
				const gchar* _tmp112_;
				const gchar* _tmp113_;
				xmlTextWriter* _tmp114_;
				_tmp74_ = _ak_it;
				if (!gee_iterator_next (_tmp74_)) {
					break;
				}
				_tmp75_ = _ak_it;
				_tmp76_ = gee_iterator_get (_tmp75_);
				ak = (gchar*) _tmp76_;
				_tmp77_ = gxml_dom_element_get_attributes (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) node) : NULL);
				_tmp78_ = _tmp77_;
				_tmp79_ = _tmp78_;
				_tmp80_ = ak;
				_tmp81_ = gee_map_get ((GeeMap*) _tmp79_, _tmp80_);
				_tmp82_ = (GXmlDomNode*) _tmp81_;
				_tmp83_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp82_, GXML_TYPE_GOM_ATTR) ? ((GXmlGomAttr*) _tmp82_) : NULL;
				if (_tmp83_ == NULL) {
					_g_object_unref0 (_tmp82_);
				}
				_tmp84_ = _tmp83_;
				_g_object_unref0 (_tmp79_);
				prop = _tmp84_;
				_tmp85_ = prop;
				if (_tmp85_ == NULL) {
					_g_object_unref0 (prop);
					_g_free0 (ak);
					continue;
				}
				_tmp86_ = prop;
				_tmp87_ = gxml_gom_attr_get_is_referenced (_tmp86_);
				_tmp88_ = _tmp87_;
				if (_tmp88_) {
					_g_object_unref0 (prop);
					_g_free0 (ak);
					continue;
				}
				_tmp89_ = prop;
				_tmp90_ = gxml_dom_attr_get_value ((GXmlDomAttr*) _tmp89_);
				_tmp91_ = _tmp90_;
				v = _tmp91_;
				_tmp92_ = v;
				if (_tmp92_ == NULL) {
					_g_free0 (v);
					_g_object_unref0 (prop);
					_g_free0 (ak);
					continue;
				}
				_tmp93_ = ak;
				if (string_contains (_tmp93_, "xmlns:")) {
					gchar* ns = NULL;
					gchar* _tmp94_;
					gchar* _tmp95_;
					const gchar* _tmp96_;
					_tmp94_ = gxml_dom_element_get_namespace_uri (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) node) : NULL);
					_tmp95_ = _tmp94_;
					ns = _tmp95_;
					_tmp96_ = ns;
					if (_tmp96_ != NULL) {
						gchar** strs = NULL;
						const gchar* _tmp97_;
						gchar** _tmp98_;
						gchar** _tmp99_;
						gint strs_length1;
						gint _strs_size_;
						gchar** _tmp100_;
						gint _tmp100__length1;
						_tmp97_ = ak;
						_tmp99_ = _tmp98_ = g_strsplit (_tmp97_, ":", 0);
						strs = _tmp99_;
						strs_length1 = _vala_array_length (_tmp98_);
						_strs_size_ = strs_length1;
						_tmp100_ = strs;
						_tmp100__length1 = strs_length1;
						if (_tmp100__length1 == 2) {
							gchar* nsp = NULL;
							gchar** _tmp101_;
							gint _tmp101__length1;
							const gchar* _tmp102_;
							gchar* _tmp103_;
							gboolean _tmp104_ = FALSE;
							const gchar* _tmp105_;
							const gchar* _tmp106_;
							_tmp101_ = strs;
							_tmp101__length1 = strs_length1;
							_tmp102_ = _tmp101_[1];
							_tmp103_ = g_strdup (_tmp102_);
							nsp = _tmp103_;
							_tmp105_ = ns;
							_tmp106_ = v;
							if (g_strcmp0 (_tmp105_, _tmp106_) == 0) {
								const gchar* _tmp107_;
								gchar* _tmp108_;
								gchar* _tmp109_;
								gchar* _tmp110_;
								_tmp107_ = nsp;
								_tmp108_ = gxml_dom_element_get_prefix (G_TYPE_CHECK_INSTANCE_TYPE (node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) node) : NULL);
								_tmp109_ = _tmp108_;
								_tmp110_ = _tmp109_;
								_tmp104_ = g_strcmp0 (_tmp107_, _tmp110_) == 0;
								_g_free0 (_tmp110_);
							} else {
								_tmp104_ = FALSE;
							}
							if (_tmp104_) {
								_g_free0 (nsp);
								strs = (_vala_array_free (strs, strs_length1, (GDestroyNotify) g_free), NULL);
								_g_free0 (ns);
								_g_free0 (v);
								_g_object_unref0 (prop);
								_g_free0 (ak);
								continue;
							}
							_g_free0 (nsp);
						}
						strs = (_vala_array_free (strs, strs_length1, (GDestroyNotify) g_free), NULL);
					}
					_g_free0 (ns);
				}
				_tmp111_ = self->priv->tw;
				_tmp112_ = ak;
				_tmp113_ = v;
				size = size + xmlTextWriterWriteAttribute (_tmp111_, (xmlChar*) _tmp112_, (xmlChar*) _tmp113_);
				_tmp114_ = self->priv->tw;
				size = size + xmlTextWriterEndAttribute (_tmp114_);
				if (size > 1500) {
					xmlTextWriter* _tmp115_;
					_tmp115_ = self->priv->tw;
					xmlTextWriterFlush (_tmp115_);
				}
				_g_free0 (v);
				_g_object_unref0 (prop);
				_g_free0 (ak);
			}
			_g_object_unref0 (_ak_it);
		}
		_g_object_unref0 (keys);
		(lp == NULL) ? NULL : (lp = (_g_list_free__g_param_spec_unref0_ (lp), NULL));
	}
	{
		GXmlDomNodeList* _n_list = NULL;
		GXmlDomNodeList* _tmp116_;
		GXmlDomNodeList* _tmp117_;
		gint _n_size = 0;
		GXmlDomNodeList* _tmp118_;
		gint _tmp119_;
		gint _tmp120_;
		gint _n_index = 0;
		_tmp116_ = gxml_dom_node_get_child_nodes (node);
		_tmp117_ = _tmp116_;
		_n_list = _tmp117_;
		_tmp118_ = _n_list;
		_tmp119_ = gee_collection_get_size ((GeeCollection*) _tmp118_);
		_tmp120_ = _tmp119_;
		_n_size = _tmp120_;
		_n_index = -1;
		while (TRUE) {
			GXmlDomNode* n = NULL;
			GXmlDomNodeList* _tmp121_;
			gpointer _tmp122_;
			GXmlDomNode* _tmp123_;
			_n_index = _n_index + 1;
			if (!(_n_index < _n_size)) {
				break;
			}
			_tmp121_ = _n_list;
			_tmp122_ = gee_list_get ((GeeList*) _tmp121_, _n_index);
			n = (GXmlDomNode*) _tmp122_;
			_tmp123_ = n;
			gxml_xparser_write_node (self, _tmp123_, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				g_propagate_error (error, _inner_error0_);
				_g_object_unref0 (n);
				_g_object_unref0 (_n_list);
				return;
			}
			_g_object_unref0 (n);
		}
		_g_object_unref0 (_n_list);
	}
}

static void
gxml_xparser_dump_async_data_free (gpointer _data)
{
	GxmlXparserDumpAsyncData* _data_;
	_data_ = _data;
	_g_free0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (GxmlXparserDumpAsyncData, _data_);
}

static void
gxml_xparser_dump_async_async_ready_wrapper (GObject *source_object,
                                             GAsyncResult *res,
                                             void *user_data)
{
	GxmlXparserDumpAsyncData* _task_data_;
	_task_data_ = g_task_get_task_data (G_TASK (res));
	if (_task_data_->_callback_ != NULL) {
		_task_data_->_callback_ (source_object, res, user_data);
	}
	_task_data_->_task_complete_ = TRUE;
}

static void
gxml_xparser_dump_async (GXmlXParser* self,
                         GAsyncReadyCallback _callback_,
                         gpointer _user_data_)
{
	GxmlXparserDumpAsyncData* _data_;
	GXmlXParser* _tmp0_;
	_data_ = g_slice_new0 (GxmlXparserDumpAsyncData);
	_data_->_callback_ = _callback_;
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, gxml_xparser_dump_async_async_ready_wrapper, _user_data_);
	if (_callback_ == NULL) {
		_data_->_task_complete_ = TRUE;
	}
	g_task_set_task_data (_data_->_async_result, _data_, gxml_xparser_dump_async_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	gxml_xparser_dump_async_co (_data_);
}

static gchar*
gxml_xparser_dump_finish (GXmlXParser* self,
                          GAsyncResult* _res_,
                          GError** error)
{
	gchar* result;
	GxmlXparserDumpAsyncData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return NULL;
	}
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static gboolean
_gxml_xparser_dump_async_co_gsource_func (gpointer self)
{
	gboolean result;
	result = gxml_xparser_dump_async_co (self);
	return result;
}

static void
gxml_xparser_dump_async_ready (GObject* source_object,
                               GAsyncResult* _res_,
                               gpointer _user_data_)
{
	GxmlXparserDumpAsyncData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_data_->_task_complete_ = TRUE;
	gxml_xparser_dump_async_co (_data_);
}

static gboolean
gxml_xparser_dump_async_co (GxmlXparserDumpAsyncData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->doc = NULL;
	_data_->_tmp0_ = xmlNewTextWriterDoc (&_data_->doc, FALSE);
	_xmlFreeTextWriter0 (_data_->self->priv->tw);
	_data_->self->priv->tw = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->self->priv->_node;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp1_, GXML_TYPE_DOM_DOCUMENT)) {
		_data_->_tmp2_ = _data_->self->priv->tw;
		xmlTextWriterStartDocument (_data_->_tmp2_, NULL, NULL, NULL);
	}
	_data_->_tmp3_ = _data_->self->priv->tw;
	_data_->_tmp4_ = gxml_parser_get_indent ((GXmlParser*) _data_->self);
	_data_->_tmp5_ = _data_->_tmp4_;
	xmlTextWriterSetIndent (_data_->_tmp3_, _data_->_tmp5_);
	_data_->_tmp6_ = _data_->self->priv->_node;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp6_, GXML_TYPE_DOM_DOCUMENT)) {
		_data_->_tmp7_ = gxml_parser_get_node ((GXmlParser*) _data_->self);
		_data_->_tmp8_ = _data_->_tmp7_;
		_data_->_tmp9_ = gxml_dom_document_get_document_element (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp8_, GXML_TYPE_DOM_DOCUMENT) ? ((GXmlDomDocument*) _data_->_tmp8_) : NULL);
		_data_->_tmp10_ = _data_->_tmp9_;
		_data_->_tmp11_ = _data_->_tmp10_;
		_data_->_tmp12_ = _data_->_tmp11_ == NULL;
		_g_object_unref0 (_data_->_tmp11_);
		if (_data_->_tmp12_) {
			_data_->_tmp13_ = _data_->self->priv->tw;
			xmlTextWriterEndDocument (_data_->_tmp13_);
		}
	}
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _gxml_xparser_dump_async_co_gsource_func, _data_, NULL);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	_data_->_tmp14_ = _data_->self->priv->_node;
	_data_->_state_ = 2;
	gxml_xparser_start_node_async (_data_->self, _data_->_tmp14_, gxml_xparser_dump_async_ready, _data_);
	return FALSE;
	_state_2:
	gxml_xparser_start_node_finish (_data_->self, _data_->_res_, &_data_->_inner_error0_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_xmlFreeDoc0 (_data_->doc);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _gxml_xparser_dump_async_co_gsource_func, _data_, NULL);
	_data_->_state_ = 3;
	return FALSE;
	_state_3:
	;
	_data_->_tmp15_ = _data_->self->priv->tw;
	xmlTextWriterEndElement (_data_->_tmp15_);
	_data_->_tmp16_ = _data_->self->priv->tw;
	xmlTextWriterEndDocument (_data_->_tmp16_);
	_data_->_tmp17_ = _data_->self->priv->tw;
	xmlTextWriterFlush (_data_->_tmp17_);
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _gxml_xparser_dump_async_co_gsource_func, _data_, NULL);
	_data_->_state_ = 4;
	return FALSE;
	_state_4:
	;
	_data_->_tmp18_ = _data_->doc;
	_data_->_tmp19_ = NULL;
	_data_->_tmp20_ = 0;
	xmlDocDumpMemory (_data_->_tmp18_, (xmlChar**) (&_data_->_tmp19_), &_data_->_tmp20_);
	_g_free0 (_data_->str);
	_data_->str = _data_->_tmp19_;
	_data_->size = _data_->_tmp20_;
	_xmlFreeTextWriter0 (_data_->self->priv->tw);
	_data_->self->priv->tw = NULL;
	_data_->result = _data_->str;
	_xmlFreeDoc0 (_data_->doc);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!_data_->_task_complete_) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
gxml_xparser_start_node_async_data_free (gpointer _data)
{
	GxmlXparserStartNodeAsyncData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->node);
	_g_object_unref0 (_data_->self);
	g_slice_free (GxmlXparserStartNodeAsyncData, _data_);
}

static void
gxml_xparser_start_node_async_async_ready_wrapper (GObject *source_object,
                                                   GAsyncResult *res,
                                                   void *user_data)
{
	GxmlXparserStartNodeAsyncData* _task_data_;
	_task_data_ = g_task_get_task_data (G_TASK (res));
	if (_task_data_->_callback_ != NULL) {
		_task_data_->_callback_ (source_object, res, user_data);
	}
	_task_data_->_task_complete_ = TRUE;
}

static void
gxml_xparser_start_node_async (GXmlXParser* self,
                               GXmlDomNode* node,
                               GAsyncReadyCallback _callback_,
                               gpointer _user_data_)
{
	GxmlXparserStartNodeAsyncData* _data_;
	GXmlXParser* _tmp0_;
	GXmlDomNode* _tmp1_;
	_data_ = g_slice_new0 (GxmlXparserStartNodeAsyncData);
	_data_->_callback_ = _callback_;
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, gxml_xparser_start_node_async_async_ready_wrapper, _user_data_);
	if (_callback_ == NULL) {
		_data_->_task_complete_ = TRUE;
	}
	g_task_set_task_data (_data_->_async_result, _data_, gxml_xparser_start_node_async_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (node);
	_g_object_unref0 (_data_->node);
	_data_->node = _tmp1_;
	gxml_xparser_start_node_async_co (_data_);
}

static void
gxml_xparser_start_node_finish (GXmlXParser* self,
                                GAsyncResult* _res_,
                                GError** error)
{
	GxmlXparserStartNodeAsyncData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static gboolean
_gxml_xparser_start_node_async_co_gsource_func (gpointer self)
{
	gboolean result;
	result = gxml_xparser_start_node_async_co (self);
	return result;
}

static gboolean
gxml_xparser_start_node_async_co (GxmlXparserStartNodeAsyncData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->tw;
	if (_data_->_tmp0_ == NULL) {
		_data_->_tmp1_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _ ("Internal Error: No TextWriter initialized"));
		_data_->_inner_error0_ = _data_->_tmp1_;
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->size = 0;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_data_->node, GXML_TYPE_DOM_ELEMENT)) {
		_data_->_tmp2_ = gxml_dom_element_get_namespace_uri (G_TYPE_CHECK_INSTANCE_TYPE (_data_->node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _data_->node) : NULL);
		_data_->_tmp3_ = _data_->_tmp2_;
		_data_->_tmp4_ = _data_->_tmp3_;
		_data_->_tmp5_ = _data_->_tmp4_ != NULL;
		_g_free0 (_data_->_tmp4_);
		if (_data_->_tmp5_) {
			_data_->_tmp6_ = gxml_dom_node_get_parent_node (_data_->node);
			_data_->_tmp7_ = _data_->_tmp6_;
			_data_->_tmp8_ = _data_->_tmp7_;
			_data_->_tmp9_ = gxml_dom_element_get_namespace_uri (G_TYPE_CHECK_INSTANCE_TYPE (_data_->node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _data_->node) : NULL);
			_data_->_tmp10_ = _data_->_tmp9_;
			_data_->_tmp11_ = _data_->_tmp10_;
			_data_->_tmp12_ = gxml_dom_node_lookup_prefix (_data_->_tmp8_, _data_->_tmp11_);
			_data_->_tmp13_ = _data_->_tmp12_;
			_g_free0 (_data_->_tmp11_);
			_g_object_unref0 (_data_->_tmp8_);
			_data_->lpns = _data_->_tmp13_;
			_data_->_tmp15_ = _data_->lpns;
			_data_->_tmp16_ = gxml_dom_element_get_prefix (G_TYPE_CHECK_INSTANCE_TYPE (_data_->node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _data_->node) : NULL);
			_data_->_tmp17_ = _data_->_tmp16_;
			_data_->_tmp18_ = _data_->_tmp17_;
			_data_->_tmp19_ = g_strcmp0 (_data_->_tmp15_, _data_->_tmp18_) == 0;
			_g_free0 (_data_->_tmp18_);
			if (_data_->_tmp19_) {
				_data_->_tmp20_ = gxml_dom_element_get_prefix (G_TYPE_CHECK_INSTANCE_TYPE (_data_->node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _data_->node) : NULL);
				_data_->_tmp21_ = _data_->_tmp20_;
				_data_->_tmp22_ = _data_->_tmp21_;
				_data_->_tmp14_ = _data_->_tmp22_ != NULL;
				_g_free0 (_data_->_tmp22_);
			} else {
				_data_->_tmp14_ = FALSE;
			}
			if (_data_->_tmp14_) {
				_data_->_tmp23_ = _data_->self->priv->tw;
				_data_->_tmp24_ = gxml_dom_node_get_node_name (_data_->node);
				_data_->_tmp25_ = _data_->_tmp24_;
				_data_->_tmp26_ = _data_->_tmp25_;
				xmlTextWriterStartElement (_data_->_tmp23_, (xmlChar*) _data_->_tmp26_);
				_g_free0 (_data_->_tmp26_);
			} else {
				_data_->_tmp27_ = _data_->self->priv->tw;
				_data_->_tmp28_ = gxml_dom_element_get_prefix (G_TYPE_CHECK_INSTANCE_TYPE (_data_->node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _data_->node) : NULL);
				_data_->_tmp29_ = _data_->_tmp28_;
				_data_->_tmp30_ = _data_->_tmp29_;
				_data_->_tmp31_ = gxml_dom_element_get_local_name (G_TYPE_CHECK_INSTANCE_TYPE (_data_->node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _data_->node) : NULL);
				_data_->_tmp32_ = _data_->_tmp31_;
				_data_->_tmp33_ = _data_->_tmp32_;
				_data_->_tmp34_ = gxml_dom_element_get_namespace_uri (G_TYPE_CHECK_INSTANCE_TYPE (_data_->node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _data_->node) : NULL);
				_data_->_tmp35_ = _data_->_tmp34_;
				_data_->_tmp36_ = _data_->_tmp35_;
				xmlTextWriterStartElementNS (_data_->_tmp27_, (xmlChar*) _data_->_tmp30_, (xmlChar*) _data_->_tmp33_, (xmlChar*) _data_->_tmp36_);
				_g_free0 (_data_->_tmp36_);
				_g_free0 (_data_->_tmp33_);
				_g_free0 (_data_->_tmp30_);
			}
			_g_free0 (_data_->lpns);
		} else {
			_data_->_tmp37_ = _data_->self->priv->tw;
			_data_->_tmp38_ = gxml_dom_element_get_local_name (G_TYPE_CHECK_INSTANCE_TYPE (_data_->node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _data_->node) : NULL);
			_data_->_tmp39_ = _data_->_tmp38_;
			_data_->_tmp40_ = _data_->_tmp39_;
			xmlTextWriterStartElement (_data_->_tmp37_, (xmlChar*) _data_->_tmp40_);
			_g_free0 (_data_->_tmp40_);
		}
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _gxml_xparser_start_node_async_co_gsource_func, _data_, NULL);
		_data_->_state_ = 1;
		return FALSE;
		_state_1:
		;
		_data_->_tmp41_ = gxml_gom_object_get_properties_list (G_TYPE_CHECK_INSTANCE_TYPE (_data_->node, GXML_TYPE_GOM_OBJECT) ? ((GXmlGomObject*) _data_->node) : NULL);
		_data_->lp = _data_->_tmp41_;
		_data_->_tmp42_ = _data_->lp;
		{
			_data_->pspec_collection = _data_->_tmp42_;
			for (_data_->pspec_it = _data_->pspec_collection; _data_->pspec_it != NULL; _data_->pspec_it = _data_->pspec_it->next) {
				_data_->_tmp43_ = _g_param_spec_ref0 ((GParamSpec*) _data_->pspec_it->data);
				_data_->pspec = _data_->_tmp43_;
				{
					g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _gxml_xparser_start_node_async_co_gsource_func, _data_, NULL);
					_data_->_state_ = 2;
					return FALSE;
					_state_2:
					;
					_data_->_tmp44_ = _data_->pspec;
					_data_->_tmp45_ = g_param_spec_get_nick (_data_->_tmp44_);
					_data_->_tmp46_ = string_replace (_data_->_tmp45_, "::", "");
					_data_->attname = _data_->_tmp46_;
					_data_->val = NULL;
					_data_->_tmp47_ = _data_->pspec;
					if (g_type_is_a (_data_->_tmp47_->value_type, GXML_TYPE_GOM_PROPERTY)) {
						_data_->_tmp48_ = _data_->pspec;
						memset (&_data_->_tmp49_, 0, sizeof (GValue));
						g_value_init (&_data_->_tmp49_, _data_->_tmp48_->value_type);
						_data_->v = _data_->_tmp49_;
						_data_->_tmp50_ = _data_->pspec;
						_data_->_tmp51_ = _data_->_tmp50_->name;
						g_object_get_property ((GObject*) _data_->node, _data_->_tmp51_, &_data_->v);
						_data_->_tmp52_ = g_value_get_object (&_data_->v);
						_data_->_tmp53_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp52_, GXML_TYPE_GOM_PROPERTY) ? ((GXmlGomProperty*) _data_->_tmp52_) : NULL);
						_data_->gp = _data_->_tmp53_;
						_data_->_tmp54_ = _data_->gp;
						if (_data_->_tmp54_ == NULL) {
							_g_object_unref0 (_data_->gp);
							G_IS_VALUE (&_data_->v) ? (g_value_unset (&_data_->v), NULL) : NULL;
							_g_free0 (_data_->val);
							_g_free0 (_data_->attname);
							_g_param_spec_unref0 (_data_->pspec);
							continue;
						}
						_data_->_tmp55_ = _data_->gp;
						_data_->_tmp56_ = gxml_gom_property_get_value (_data_->_tmp55_);
						_data_->_tmp57_ = _data_->_tmp56_;
						_g_free0 (_data_->val);
						_data_->val = _data_->_tmp57_;
						_g_object_unref0 (_data_->gp);
						G_IS_VALUE (&_data_->v) ? (g_value_unset (&_data_->v), NULL) : NULL;
					} else {
						_data_->_tmp58_ = _data_->pspec;
						_data_->_tmp59_ = gxml_gom_object_get_property_string (G_TYPE_CHECK_INSTANCE_TYPE (_data_->node, GXML_TYPE_GOM_OBJECT) ? ((GXmlGomObject*) _data_->node) : NULL, _data_->_tmp58_);
						_g_free0 (_data_->val);
						_data_->val = _data_->_tmp59_;
					}
					_data_->_tmp60_ = _data_->val;
					if (_data_->_tmp60_ == NULL) {
						_g_free0 (_data_->val);
						_g_free0 (_data_->attname);
						_g_param_spec_unref0 (_data_->pspec);
						continue;
					}
					_data_->_tmp61_ = _data_->self->priv->tw;
					_data_->_tmp62_ = _data_->attname;
					_data_->_tmp63_ = _data_->val;
					_data_->size = _data_->size + xmlTextWriterWriteAttribute (_data_->_tmp61_, (xmlChar*) _data_->_tmp62_, (xmlChar*) _data_->_tmp63_);
					_data_->_tmp64_ = _data_->self->priv->tw;
					_data_->size = _data_->size + xmlTextWriterEndAttribute (_data_->_tmp64_);
					if (_data_->size > 1500) {
						_data_->_tmp65_ = _data_->self->priv->tw;
						xmlTextWriterFlush (_data_->_tmp65_);
					}
					_g_free0 (_data_->val);
					_g_free0 (_data_->attname);
					_g_param_spec_unref0 (_data_->pspec);
				}
			}
		}
		{
			_data_->_tmp66_ = gxml_dom_element_get_attributes (G_TYPE_CHECK_INSTANCE_TYPE (_data_->node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _data_->node) : NULL);
			_data_->_tmp67_ = _data_->_tmp66_;
			_data_->_tmp68_ = _data_->_tmp67_;
			_data_->_tmp69_ = gee_map_get_keys ((GeeMap*) _data_->_tmp68_);
			_data_->_tmp70_ = _data_->_tmp69_;
			_data_->_tmp71_ = _data_->_tmp70_;
			_data_->_tmp72_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp71_);
			_data_->_tmp73_ = _data_->_tmp72_;
			_g_object_unref0 (_data_->_tmp71_);
			_g_object_unref0 (_data_->_tmp68_);
			_data_->_ak_it = _data_->_tmp73_;
			while (TRUE) {
				_data_->_tmp74_ = _data_->_ak_it;
				if (!gee_iterator_next (_data_->_tmp74_)) {
					break;
				}
				_data_->_tmp75_ = _data_->_ak_it;
				_data_->_tmp76_ = gee_iterator_get (_data_->_tmp75_);
				_data_->ak = (gchar*) _data_->_tmp76_;
				g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _gxml_xparser_start_node_async_co_gsource_func, _data_, NULL);
				_data_->_state_ = 3;
				return FALSE;
				_state_3:
				;
				_data_->_tmp77_ = gxml_dom_element_get_attributes (G_TYPE_CHECK_INSTANCE_TYPE (_data_->node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _data_->node) : NULL);
				_data_->_tmp78_ = _data_->_tmp77_;
				_data_->_tmp79_ = G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp78_, GEE_TYPE_HASH_MAP) ? ((GeeHashMap*) _data_->_tmp78_) : NULL;
				if (_data_->_tmp79_ == NULL) {
					_g_object_unref0 (_data_->_tmp78_);
				}
				_data_->_tmp80_ = _data_->_tmp79_;
				_data_->_tmp81_ = _data_->ak;
				_data_->_tmp82_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp80_, _data_->_tmp81_);
				_data_->_tmp83_ = (gchar*) _data_->_tmp82_;
				_g_object_unref0 (_data_->_tmp80_);
				_data_->_vala1_v = _data_->_tmp83_;
				_data_->_tmp84_ = _data_->ak;
				if (string_contains (_data_->_tmp84_, "xmlns:")) {
					_data_->_tmp85_ = gxml_dom_element_get_namespace_uri (G_TYPE_CHECK_INSTANCE_TYPE (_data_->node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _data_->node) : NULL);
					_data_->_tmp86_ = _data_->_tmp85_;
					_data_->ns = _data_->_tmp86_;
					_data_->_tmp87_ = _data_->ns;
					if (_data_->_tmp87_ != NULL) {
						_data_->_tmp88_ = _data_->ak;
						_data_->_tmp90_ = _data_->_tmp89_ = g_strsplit (_data_->_tmp88_, ":", 0);
						_data_->strs = _data_->_tmp90_;
						_data_->strs_length1 = _vala_array_length (_data_->_tmp89_);
						_data_->_strs_size_ = _data_->strs_length1;
						_data_->_tmp91_ = _data_->strs;
						_data_->_tmp91__length1 = _data_->strs_length1;
						if (_data_->_tmp91__length1 == 2) {
							_data_->_tmp92_ = _data_->strs;
							_data_->_tmp92__length1 = _data_->strs_length1;
							_data_->_tmp93_ = _data_->_tmp92_[1];
							_data_->_tmp94_ = g_strdup (_data_->_tmp93_);
							_data_->nsp = _data_->_tmp94_;
							_data_->_tmp96_ = _data_->ns;
							_data_->_tmp97_ = _data_->_vala1_v;
							if (g_strcmp0 (_data_->_tmp96_, _data_->_tmp97_) == 0) {
								_data_->_tmp98_ = _data_->nsp;
								_data_->_tmp99_ = gxml_dom_element_get_prefix (G_TYPE_CHECK_INSTANCE_TYPE (_data_->node, GXML_TYPE_DOM_ELEMENT) ? ((GXmlDomElement*) _data_->node) : NULL);
								_data_->_tmp100_ = _data_->_tmp99_;
								_data_->_tmp101_ = _data_->_tmp100_;
								_data_->_tmp95_ = g_strcmp0 (_data_->_tmp98_, _data_->_tmp101_) == 0;
								_g_free0 (_data_->_tmp101_);
							} else {
								_data_->_tmp95_ = FALSE;
							}
							if (_data_->_tmp95_) {
								_g_free0 (_data_->nsp);
								_data_->strs = (_vala_array_free (_data_->strs, _data_->strs_length1, (GDestroyNotify) g_free), NULL);
								_g_free0 (_data_->ns);
								_g_free0 (_data_->_vala1_v);
								_g_free0 (_data_->ak);
								continue;
							}
							_g_free0 (_data_->nsp);
						}
						_data_->strs = (_vala_array_free (_data_->strs, _data_->strs_length1, (GDestroyNotify) g_free), NULL);
					}
					_g_free0 (_data_->ns);
				}
				_data_->_tmp102_ = _data_->self->priv->tw;
				_data_->_tmp103_ = _data_->ak;
				_data_->_tmp104_ = _data_->_vala1_v;
				_data_->size = _data_->size + xmlTextWriterWriteAttribute (_data_->_tmp102_, (xmlChar*) _data_->_tmp103_, (xmlChar*) _data_->_tmp104_);
				_data_->_tmp105_ = _data_->self->priv->tw;
				_data_->size = _data_->size + xmlTextWriterEndAttribute (_data_->_tmp105_);
				if (_data_->size > 1500) {
					_data_->_tmp106_ = _data_->self->priv->tw;
					xmlTextWriterFlush (_data_->_tmp106_);
				}
				_g_free0 (_data_->_vala1_v);
				_g_free0 (_data_->ak);
			}
			_g_object_unref0 (_data_->_ak_it);
		}
		(_data_->lp == NULL) ? NULL : (_data_->lp = (_g_list_free__g_param_spec_unref0_ (_data_->lp), NULL));
	}
	{
		_data_->_tmp107_ = gxml_dom_node_get_child_nodes (_data_->node);
		_data_->_tmp108_ = _data_->_tmp107_;
		_data_->_n_list = _data_->_tmp108_;
		_data_->_tmp109_ = _data_->_n_list;
		_data_->_tmp110_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp109_);
		_data_->_tmp111_ = _data_->_tmp110_;
		_data_->_n_size = _data_->_tmp111_;
		_data_->_n_index = -1;
		while (TRUE) {
			_data_->_n_index = _data_->_n_index + 1;
			if (!(_data_->_n_index < _data_->_n_size)) {
				break;
			}
			_data_->_tmp112_ = _data_->_n_list;
			_data_->_tmp113_ = gee_list_get ((GeeList*) _data_->_tmp112_, _data_->_n_index);
			_data_->n = (GXmlDomNode*) _data_->_tmp113_;
			g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _gxml_xparser_start_node_async_co_gsource_func, _data_, NULL);
			_data_->_state_ = 4;
			return FALSE;
			_state_4:
			;
			_data_->_tmp114_ = _data_->n;
			gxml_xparser_write_node (_data_->self, _data_->_tmp114_, &_data_->_inner_error0_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
				_g_object_unref0 (_data_->n);
				_g_object_unref0 (_data_->_n_list);
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
			_g_object_unref0 (_data_->n);
		}
		_g_object_unref0 (_data_->_n_list);
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!_data_->_task_complete_) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
gxml_xparser_write_node (GXmlXParser* self,
                         GXmlDomNode* n,
                         GError** error)
{
	xmlTextWriter* _tmp0_;
	gint size = 0;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (n != NULL);
	_tmp0_ = self->priv->tw;
	if (_tmp0_ == NULL) {
		GError* _tmp1_;
		_tmp1_ = g_error_new_literal (GXML_PARSER_ERROR, GXML_PARSER_ERROR_INVALID_DATA_ERROR, _ ("Internal Error: No TextWriter initialized"));
		_inner_error0_ = _tmp1_;
		g_propagate_error (error, _inner_error0_);
		return;
	}
	size = 0;
	if (G_TYPE_CHECK_INSTANCE_TYPE (n, GXML_TYPE_DOM_ELEMENT)) {
		xmlTextWriter* _tmp2_;
		gxml_xparser_start_node (self, n, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_propagate_error (error, _inner_error0_);
			return;
		}
		_tmp2_ = self->priv->tw;
		size = size + xmlTextWriterEndElement (_tmp2_);
		if (size > 1500) {
			xmlTextWriter* _tmp3_;
			_tmp3_ = self->priv->tw;
			xmlTextWriterFlush (_tmp3_);
		}
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (n, GXML_TYPE_DOM_TEXT)) {
		xmlTextWriter* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp4_ = self->priv->tw;
		_tmp5_ = gxml_dom_node_get_node_value (n);
		_tmp6_ = _tmp5_;
		_tmp7_ = _tmp6_;
		size = size + xmlTextWriterWriteString (_tmp4_, (xmlChar*) _tmp7_);
		_g_free0 (_tmp7_);
		if (size > 1500) {
			xmlTextWriter* _tmp8_;
			_tmp8_ = self->priv->tw;
			xmlTextWriterFlush (_tmp8_);
		}
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (n, GXML_TYPE_DOM_COMMENT)) {
		xmlTextWriter* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		_tmp9_ = self->priv->tw;
		_tmp10_ = gxml_dom_node_get_node_value (n);
		_tmp11_ = _tmp10_;
		_tmp12_ = _tmp11_;
		size = size + xmlTextWriterWriteComment (_tmp9_, (xmlChar*) _tmp12_);
		_g_free0 (_tmp12_);
		if (size > 1500) {
			xmlTextWriter* _tmp13_;
			_tmp13_ = self->priv->tw;
			xmlTextWriterFlush (_tmp13_);
		}
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (n, GXML_TYPE_DOM_PROCESSING_INSTRUCTION)) {
		xmlTextWriter* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
		gchar* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		gchar* _tmp20_;
		_tmp14_ = self->priv->tw;
		_tmp15_ = gxml_dom_processing_instruction_get_target (G_TYPE_CHECK_INSTANCE_TYPE (n, GXML_TYPE_DOM_PROCESSING_INSTRUCTION) ? ((GXmlDomProcessingInstruction*) n) : NULL);
		_tmp16_ = _tmp15_;
		_tmp17_ = _tmp16_;
		_tmp18_ = gxml_dom_character_data_get_data ((GXmlDomCharacterData*) (G_TYPE_CHECK_INSTANCE_TYPE (n, GXML_TYPE_DOM_PROCESSING_INSTRUCTION) ? ((GXmlDomProcessingInstruction*) n) : NULL));
		_tmp19_ = _tmp18_;
		_tmp20_ = _tmp19_;
		size = size + xmlTextWriterWritePI (_tmp14_, (xmlChar*) _tmp17_, (xmlChar*) _tmp20_);
		_g_free0 (_tmp20_);
		_g_free0 (_tmp17_);
		if (size > 1500) {
			xmlTextWriter* _tmp21_;
			_tmp21_ = self->priv->tw;
			xmlTextWriterFlush (_tmp21_);
		}
	}
	if (G_TYPE_CHECK_INSTANCE_TYPE (n, GXML_TYPE_DOM_DOCUMENT_TYPE)) {
		xmlTextWriter* _tmp22_;
		const gchar* _tmp23_;
		const gchar* _tmp24_;
		const gchar* _tmp25_;
		const gchar* _tmp26_;
		const gchar* _tmp27_;
		const gchar* _tmp28_;
		_tmp22_ = self->priv->tw;
		_tmp23_ = gxml_dom_document_type_get_name (G_TYPE_CHECK_INSTANCE_TYPE (n, GXML_TYPE_DOM_DOCUMENT_TYPE) ? ((GXmlDomDocumentType*) n) : NULL);
		_tmp24_ = _tmp23_;
		_tmp25_ = gxml_dom_document_type_get_public_id (G_TYPE_CHECK_INSTANCE_TYPE (n, GXML_TYPE_DOM_DOCUMENT_TYPE) ? ((GXmlDomDocumentType*) n) : NULL);
		_tmp26_ = _tmp25_;
		_tmp27_ = gxml_dom_document_type_get_system_id (G_TYPE_CHECK_INSTANCE_TYPE (n, GXML_TYPE_DOM_DOCUMENT_TYPE) ? ((GXmlDomDocumentType*) n) : NULL);
		_tmp28_ = _tmp27_;
		size = size + xmlTextWriterWriteDTD (_tmp22_, (xmlChar*) _tmp24_, (xmlChar*) _tmp26_, (xmlChar*) _tmp28_, (xmlChar*) NULL);
		if (size > 1500) {
			xmlTextWriter* _tmp29_;
			_tmp29_ = self->priv->tw;
			xmlTextWriterFlush (_tmp29_);
		}
	}
}

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

static void
gxml_xparser_real_set_backup (GXmlParser* base,
                              gboolean value)
{
	GXmlXParser* self;
	self = (GXmlXParser*) base;
	if (gxml_xparser_real_get_backup (base) != value) {
		self->priv->_backup = value;
		g_object_notify_by_pspec ((GObject *) self, gxml_xparser_properties[GXML_XPARSER_BACKUP_PROPERTY]);
	}
}

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

static void
gxml_xparser_real_set_indent (GXmlParser* base,
                              gboolean value)
{
	GXmlXParser* self;
	self = (GXmlXParser*) base;
	if (gxml_xparser_real_get_indent (base) != value) {
		self->priv->_indent = value;
		g_object_notify_by_pspec ((GObject *) self, gxml_xparser_properties[GXML_XPARSER_INDENT_PROPERTY]);
	}
}

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

static GCancellable*
gxml_xparser_real_get_cancellable (GXmlParser* base)
{
	GCancellable* result;
	GXmlXParser* self;
	GCancellable* _tmp0_;
	self = (GXmlXParser*) base;
	_tmp0_ = self->priv->_cancellable;
	result = _tmp0_;
	return result;
}

static void
gxml_xparser_real_set_cancellable (GXmlParser* base,
                                   GCancellable* value)
{
	GXmlXParser* self;
	self = (GXmlXParser*) base;
	if (gxml_xparser_real_get_cancellable (base) != value) {
		GCancellable* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_cancellable);
		self->priv->_cancellable = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gxml_xparser_properties[GXML_XPARSER_CANCELLABLE_PROPERTY]);
	}
}

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);
	gxml_parser_set_cancellable ((GXmlParser*) self, NULL);
	_g_object_unref0 (self->priv->tistream);
	self->priv->tistream = NULL;
	return obj;
}

static void
gxml_xparser_class_init (GXmlXParserClass * klass,
                         gpointer klass_data)
{
	gxml_xparser_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GXmlXParser_private_offset);
	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_PROPERTY, gxml_xparser_properties[GXML_XPARSER_BACKUP_PROPERTY] = g_param_spec_boolean ("backup", "backup", "backup", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_XPARSER_INDENT_PROPERTY, gxml_xparser_properties[GXML_XPARSER_INDENT_PROPERTY] = g_param_spec_boolean ("indent", "indent", "indent", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_XPARSER_NODE_PROPERTY, gxml_xparser_properties[GXML_XPARSER_NODE_PROPERTY] = g_param_spec_object ("node", "node", "node", GXML_TYPE_DOM_NODE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_XPARSER_CANCELLABLE_PROPERTY, gxml_xparser_properties[GXML_XPARSER_CANCELLABLE_PROPERTY] = g_param_spec_object ("cancellable", "cancellable", "cancellable", g_cancellable_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
gxml_xparser_gxml_parser_interface_init (GXmlParserIface * iface,
                                         gpointer iface_data)
{
	gxml_xparser_gxml_parser_parent_iface = g_type_interface_peek_parent (iface);
	iface->write_stream = (void (*) (GXmlParser*, GOutputStream*, GError**)) gxml_xparser_real_write_stream;
	iface->write_stream_async = (void (*) (GXmlParser*, GOutputStream*, GAsyncReadyCallback, gpointer)) gxml_xparser_real_write_stream_async;
	iface->write_stream_finish = (void (*) (GXmlParser*, GAsyncResult*, GError**)) gxml_xparser_write_stream_finish;
	iface->create_stream = (GInputStream* (*) (GXmlParser*, GError**)) gxml_xparser_real_create_stream;
	iface->create_stream_async = (void (*) (GXmlParser*, GAsyncReadyCallback, gpointer)) gxml_xparser_real_create_stream_async;
	iface->create_stream_finish = (GInputStream* (*) (GXmlParser*, GAsyncResult*, GError**)) gxml_xparser_create_stream_finish;
	iface->write_string = (gchar* (*) (GXmlParser*, GError**)) gxml_xparser_real_write_string;
	iface->write_string_async = (void (*) (GXmlParser*, GAsyncReadyCallback, gpointer)) gxml_xparser_real_write_string_async;
	iface->write_string_finish = (gchar* (*) (GXmlParser*, GAsyncResult*, GError**)) gxml_xparser_write_string_finish;
	iface->read_string = (void (*) (GXmlParser*, const gchar*, GError**)) gxml_xparser_real_read_string;
	iface->read_string_async = (void (*) (GXmlParser*, const gchar*, GAsyncReadyCallback, gpointer)) gxml_xparser_real_read_string_async;
	iface->read_string_finish = (void (*) (GXmlParser*, GAsyncResult*, GError**)) gxml_xparser_read_string_finish;
	iface->read_stream = (void (*) (GXmlParser*, GInputStream*, GError**)) gxml_xparser_real_read_stream;
	iface->read_stream_async = (void (*) (GXmlParser*, GInputStream*, GAsyncReadyCallback, gpointer)) gxml_xparser_real_read_stream_async;
	iface->read_stream_finish = (void (*) (GXmlParser*, GAsyncResult*, GError**)) gxml_xparser_read_stream_finish;
	iface->read_child_nodes_stream = (void (*) (GXmlParser*, GInputStream*, GError**)) gxml_xparser_real_read_child_nodes_stream;
	iface->read_unparsed = (gchar* (*) (GXmlParser*, GError**)) gxml_xparser_real_read_unparsed;
	iface->move_next_node = (gboolean (*) (GXmlParser*, GError**)) gxml_xparser_real_move_next_node;
	iface->current_is_empty_element = (gboolean (*) (GXmlParser*)) gxml_xparser_real_current_is_empty_element;
	iface->current_is_element = (gboolean (*) (GXmlParser*)) gxml_xparser_real_current_is_element;
	iface->current_is_document = (gboolean (*) (GXmlParser*)) gxml_xparser_real_current_is_document;
	iface->current_node_name = (gchar* (*) (GXmlParser*)) gxml_xparser_real_current_node_name;
	iface->create_element = (GXmlDomElement* (*) (GXmlParser*, GXmlDomNode*, GError**)) gxml_xparser_real_create_element;
	iface->read_element = (void (*) (GXmlParser*, GXmlDomElement*, GError**)) gxml_xparser_real_read_element;
	iface->read_child_node = (gboolean (*) (GXmlParser*, GXmlDomNode*, GError**)) gxml_xparser_real_read_child_node;
	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;
	iface->get_cancellable = gxml_xparser_real_get_cancellable;
	iface->set_cancellable = gxml_xparser_real_set_cancellable;
}

static void
gxml_xparser_instance_init (GXmlXParser * self,
                            gpointer klass)
{
	self->priv = gxml_xparser_get_instance_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_unref0 (self->priv->tistream);
	_g_object_unref0 (self->priv->_cancellable);
	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);
		GXmlXParser_private_offset = g_type_add_instance_private (gxml_xparser_type_id, sizeof (GXmlXParserPrivate));
		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_PROPERTY:
		g_value_set_boolean (value, gxml_parser_get_backup ((GXmlParser*) self));
		break;
		case GXML_XPARSER_INDENT_PROPERTY:
		g_value_set_boolean (value, gxml_parser_get_indent ((GXmlParser*) self));
		break;
		case GXML_XPARSER_NODE_PROPERTY:
		g_value_set_object (value, gxml_parser_get_node ((GXmlParser*) self));
		break;
		case GXML_XPARSER_CANCELLABLE_PROPERTY:
		g_value_set_object (value, gxml_parser_get_cancellable ((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_PROPERTY:
		gxml_parser_set_backup ((GXmlParser*) self, g_value_get_boolean (value));
		break;
		case GXML_XPARSER_INDENT_PROPERTY:
		gxml_parser_set_indent ((GXmlParser*) self, g_value_get_boolean (value));
		break;
		case GXML_XPARSER_CANCELLABLE_PROPERTY:
		gxml_parser_set_cancellable ((GXmlParser*) self, g_value_get_object (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;
}

