------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2008-2010 Vadim Godunko <vgodunko@gmail.com>                 --
--                                                                          --
-- QtAda is free software;  you can  redistribute it and/or modify it under --
-- terms of the  GNU General Public License as published  by the Free Soft- --
-- ware  Foundation;  either version 2,  or (at your option) any later ver- --
-- sion. QtAda is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
-- for  more details.  You should have  received  a copy of the GNU General --
-- Public License distributed with QtAda;  see file COPYING.  If not, write --
-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
-- Boston, MA 02110-1301, USA.                                              --
--                                                                          --
-- As a special exception,  if other files  instantiate  generics from this --
-- unit, or you link  this unit with other files  to produce an executable, --
-- this  unit  does not  by itself cause  the resulting  executable  to  be --
-- covered  by the  GNU  General  Public  License.  This exception does not --
-- however invalidate  any other reasons why  the executable file  might be --
-- covered by the  GNU Public License.                                      --
--                                                                          --
------------------------------------------------------------------------------
--    This file has been generated automatically. Please don't edit it.     --
------------------------------------------------------------------------------
with Qt_Ada.Internals.Boolean_Conversions;
with Qt_Ada.Internals.Objects;
with System.Address_To_Access_Conversions;

package body Qt4.Dom_Nodes is

   function initialize_QDomAttr
    (Storage : System.Address)
      return Internals.QDomNode_Access;
   pragma Import (C, initialize_QDomAttr, "__QtAda_inititialize_QDomAttr");

   function adjust_QDomAttr
    (Storage : System.Address;
     From    : Internals.QDomNode_Access)
       return Internals.QDomNode_Access;
   pragma Import (C, adjust_QDomAttr, "__QtAda_adjust_QDomAttr");

   procedure finalize_QDomAttr (Object : Internals.QDomNode_Access);
   pragma Import (C, finalize_QDomAttr, "__QtAda_finalize_QDomAttr");

   procedure QDomAttr_name
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomAttr_name, "__QtAda_QDomAttr_name_Q");

   function QDomAttr_nodeType
    (Self : Internals.QDomNode_Access)
       return Dom_Node_Type;
   pragma Import (C, QDomAttr_nodeType, "__QtAda_QDomAttr_nodeType_Q");

   procedure QDomAttr_ownerElement
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomAttr_ownerElement, "__QtAda_QDomAttr_ownerElement_Q");

   procedure QDomAttr_setValue_QStringCR
    (Self : Internals.QDomNode_Access;
     V : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomAttr_setValue_QStringCR, "__QtAda_QDomAttr_setValue_QStringCR");

   function QDomAttr_specified
    (Self : Internals.QDomNode_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomAttr_specified, "__QtAda_QDomAttr_specified_Q");

   procedure QDomAttr_value
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomAttr_value, "__QtAda_QDomAttr_value_Q");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_Dom_Attr) is
   begin
      Self.Object := adjust_QDomAttr (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_Dom_Attr) is
   begin
      if not Self.Wrapper then
         finalize_QDomAttr (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_Dom_Attr) is
      use type Internals.QDomNode_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QDomAttr (Self.Storage'Address);
      end if;
   end Initialize;

   ----------
   -- Name --
   ----------

   function Name
    (Self : Q_Dom_Attr'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomAttr_name (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Name;

   ---------------
   -- Node_Type --
   ---------------

   function Node_Type
    (Self : Q_Dom_Attr'Class)
       return Dom_Node_Type
   is
   begin
      return QDomAttr_nodeType (Self.Object);
   end Node_Type;

   -------------------
   -- Owner_Element --
   -------------------

   function Owner_Element
    (Self : Q_Dom_Attr'Class)
       return Q_Dom_Element
   is
   begin
      return Returns : Q_Dom_Element do
         QDomAttr_ownerElement (Returns.Object, Self.Object);
      end return;
   end Owner_Element;

   ---------------
   -- Set_Value --
   ---------------

   procedure Set_Value
    (Self : in out Q_Dom_Attr'Class;
     V : Qt4.Strings.Q_String'Class)
   is
   begin
      QDomAttr_setValue_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (V));
   end Set_Value;

   ---------------
   -- Specified --
   ---------------

   function Specified
    (Self : Q_Dom_Attr'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomAttr_specified (Self.Object), 0);
   end Specified;

   -----------
   -- Value --
   -----------

   function Value
    (Self : Q_Dom_Attr'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomAttr_value (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Value;

   function initialize_QDomCDATASection
    (Storage : System.Address)
      return Internals.QDomNode_Access;
   pragma Import (C, initialize_QDomCDATASection, "__QtAda_inititialize_QDomCDATASection");

   function adjust_QDomCDATASection
    (Storage : System.Address;
     From    : Internals.QDomNode_Access)
       return Internals.QDomNode_Access;
   pragma Import (C, adjust_QDomCDATASection, "__QtAda_adjust_QDomCDATASection");

   procedure finalize_QDomCDATASection (Object : Internals.QDomNode_Access);
   pragma Import (C, finalize_QDomCDATASection, "__QtAda_finalize_QDomCDATASection");

   function QDomCDATASection_nodeType
    (Self : Internals.QDomNode_Access)
       return Dom_Node_Type;
   pragma Import (C, QDomCDATASection_nodeType, "__QtAda_QDomCDATASection_nodeType_Q");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_Dom_CDATA_Section) is
   begin
      Self.Object := adjust_QDomCDATASection (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_Dom_CDATA_Section) is
   begin
      if not Self.Wrapper then
         finalize_QDomCDATASection (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_Dom_CDATA_Section) is
      use type Internals.QDomNode_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QDomCDATASection (Self.Storage'Address);
      end if;
   end Initialize;

   ---------------
   -- Node_Type --
   ---------------

   function Node_Type
    (Self : Q_Dom_CDATA_Section'Class)
       return Dom_Node_Type
   is
   begin
      return QDomCDATASection_nodeType (Self.Object);
   end Node_Type;

   function initialize_QDomCharacterData
    (Storage : System.Address)
      return Internals.QDomNode_Access;
   pragma Import (C, initialize_QDomCharacterData, "__QtAda_inititialize_QDomCharacterData");

   function adjust_QDomCharacterData
    (Storage : System.Address;
     From    : Internals.QDomNode_Access)
       return Internals.QDomNode_Access;
   pragma Import (C, adjust_QDomCharacterData, "__QtAda_adjust_QDomCharacterData");

   procedure finalize_QDomCharacterData (Object : Internals.QDomNode_Access);
   pragma Import (C, finalize_QDomCharacterData, "__QtAda_finalize_QDomCharacterData");

   procedure QDomCharacterData_appendData_QStringCR
    (Self : Internals.QDomNode_Access;
     Arg : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomCharacterData_appendData_QStringCR, "__QtAda_QDomCharacterData_appendData_QStringCR");

   procedure QDomCharacterData_data
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomCharacterData_data, "__QtAda_QDomCharacterData_data_Q");

   procedure QDomCharacterData_deleteData_ulong_ulong
    (Self : Internals.QDomNode_Access;
     Offset : Qt4.Q_Unsigned_Long;
     Count : Qt4.Q_Unsigned_Long);
   pragma Import (C, QDomCharacterData_deleteData_ulong_ulong, "__QtAda_QDomCharacterData_deleteData_ulong_ulong");

   procedure QDomCharacterData_insertData_ulong_QStringCR
    (Self : Internals.QDomNode_Access;
     Offset : Qt4.Q_Unsigned_Long;
     Arg : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomCharacterData_insertData_ulong_QStringCR, "__QtAda_QDomCharacterData_insertData_ulong_QStringCR");

   function QDomCharacterData_length
    (Self : Internals.QDomNode_Access)
       return Qt4.Q_Unsigned_Integer;
   pragma Import (C, QDomCharacterData_length, "__QtAda_QDomCharacterData_length_Q");

   function QDomCharacterData_nodeType
    (Self : Internals.QDomNode_Access)
       return Dom_Node_Type;
   pragma Import (C, QDomCharacterData_nodeType, "__QtAda_QDomCharacterData_nodeType_Q");

   procedure QDomCharacterData_replaceData_ulong_ulong_QStringCR
    (Self : Internals.QDomNode_Access;
     Offset : Qt4.Q_Unsigned_Long;
     Count : Qt4.Q_Unsigned_Long;
     Arg : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomCharacterData_replaceData_ulong_ulong_QStringCR, "__QtAda_QDomCharacterData_replaceData_ulong_ulong_QStringCR");

   procedure QDomCharacterData_setData_QStringCR
    (Self : Internals.QDomNode_Access;
     Arg : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomCharacterData_setData_QStringCR, "__QtAda_QDomCharacterData_setData_QStringCR");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_Dom_Character_Data) is
   begin
      Self.Object := adjust_QDomCharacterData (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_Dom_Character_Data) is
   begin
      if not Self.Wrapper then
         finalize_QDomCharacterData (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_Dom_Character_Data) is
      use type Internals.QDomNode_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QDomCharacterData (Self.Storage'Address);
      end if;
   end Initialize;

   -----------------
   -- Append_Data --
   -----------------

   procedure Append_Data
    (Self : in out Q_Dom_Character_Data'Class;
     Arg : Qt4.Strings.Q_String'Class)
   is
   begin
      QDomCharacterData_appendData_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Arg));
   end Append_Data;

   ----------
   -- Data --
   ----------

   function Data
    (Self : Q_Dom_Character_Data'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomCharacterData_data (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Data;

   -----------------
   -- Delete_Data --
   -----------------

   procedure Delete_Data
    (Self : in out Q_Dom_Character_Data'Class;
     Offset : Qt4.Q_Unsigned_Long;
     Count : Qt4.Q_Unsigned_Long)
   is
   begin
      QDomCharacterData_deleteData_ulong_ulong (Self.Object, Offset, Count);
   end Delete_Data;

   -----------------
   -- Insert_Data --
   -----------------

   procedure Insert_Data
    (Self : in out Q_Dom_Character_Data'Class;
     Offset : Qt4.Q_Unsigned_Long;
     Arg : Qt4.Strings.Q_String'Class)
   is
   begin
      QDomCharacterData_insertData_ulong_QStringCR (Self.Object, Offset, Qt4.Strings.Internals.QString_View (Arg));
   end Insert_Data;

   ------------
   -- Length --
   ------------

   function Length
    (Self : Q_Dom_Character_Data'Class)
       return Qt4.Q_Unsigned_Integer
   is
   begin
      return QDomCharacterData_length (Self.Object);
   end Length;

   ---------------
   -- Node_Type --
   ---------------

   function Node_Type
    (Self : Q_Dom_Character_Data'Class)
       return Dom_Node_Type
   is
   begin
      return QDomCharacterData_nodeType (Self.Object);
   end Node_Type;

   ------------------
   -- Replace_Data --
   ------------------

   procedure Replace_Data
    (Self : in out Q_Dom_Character_Data'Class;
     Offset : Qt4.Q_Unsigned_Long;
     Count : Qt4.Q_Unsigned_Long;
     Arg : Qt4.Strings.Q_String'Class)
   is
   begin
      QDomCharacterData_replaceData_ulong_ulong_QStringCR (Self.Object, Offset, Count, Qt4.Strings.Internals.QString_View (Arg));
   end Replace_Data;

   --------------
   -- Set_Data --
   --------------

   procedure Set_Data
    (Self : in out Q_Dom_Character_Data'Class;
     Arg : Qt4.Strings.Q_String'Class)
   is
   begin
      QDomCharacterData_setData_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Arg));
   end Set_Data;

   function initialize_QDomComment
    (Storage : System.Address)
      return Internals.QDomNode_Access;
   pragma Import (C, initialize_QDomComment, "__QtAda_inititialize_QDomComment");

   function adjust_QDomComment
    (Storage : System.Address;
     From    : Internals.QDomNode_Access)
       return Internals.QDomNode_Access;
   pragma Import (C, adjust_QDomComment, "__QtAda_adjust_QDomComment");

   procedure finalize_QDomComment (Object : Internals.QDomNode_Access);
   pragma Import (C, finalize_QDomComment, "__QtAda_finalize_QDomComment");

   function QDomComment_nodeType
    (Self : Internals.QDomNode_Access)
       return Dom_Node_Type;
   pragma Import (C, QDomComment_nodeType, "__QtAda_QDomComment_nodeType_Q");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_Dom_Comment) is
   begin
      Self.Object := adjust_QDomComment (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_Dom_Comment) is
   begin
      if not Self.Wrapper then
         finalize_QDomComment (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_Dom_Comment) is
      use type Internals.QDomNode_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QDomComment (Self.Storage'Address);
      end if;
   end Initialize;

   ---------------
   -- Node_Type --
   ---------------

   function Node_Type
    (Self : Q_Dom_Comment'Class)
       return Dom_Node_Type
   is
   begin
      return QDomComment_nodeType (Self.Object);
   end Node_Type;

   function initialize_QDomDocument
    (Storage : System.Address)
      return Internals.QDomNode_Access;
   pragma Import (C, initialize_QDomDocument, "__QtAda_inititialize_QDomDocument");

   function initialize_QDomDocument_QStringCR
    (Storage : System.Address;
     Name : Qt4.Strings.Internals.QString_Access)
      return Internals.QDomNode_Access;
   pragma Import (C, initialize_QDomDocument_QStringCR, "__QtAda_inititialize_QDomDocument_QStringCR");

   function initialize_QDomDocument_QDomDocumentTypeCR
    (Storage : System.Address;
     Doctype : Internals.QDomNode_Access)
      return Internals.QDomNode_Access;
   pragma Import (C, initialize_QDomDocument_QDomDocumentTypeCR, "__QtAda_inititialize_QDomDocument_QDomDocumentTypeCR");

   function adjust_QDomDocument
    (Storage : System.Address;
     From    : Internals.QDomNode_Access)
       return Internals.QDomNode_Access;
   pragma Import (C, adjust_QDomDocument, "__QtAda_adjust_QDomDocument");

   procedure finalize_QDomDocument (Object : Internals.QDomNode_Access);
   pragma Import (C, finalize_QDomDocument, "__QtAda_finalize_QDomDocument");

   procedure QDomDocument_createAttribute_QStringCR
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access;
     Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomDocument_createAttribute_QStringCR, "__QtAda_QDomDocument_createAttribute_QStringCR");

   procedure QDomDocument_createAttributeNS_QStringCR_QStringCR
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access;
     Ns_URI : Qt4.Strings.Internals.QString_Access;
     Q_Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomDocument_createAttributeNS_QStringCR_QStringCR, "__QtAda_QDomDocument_createAttributeNS_QStringCR_QStringCR");

   procedure QDomDocument_createCDATASection_QStringCR
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access;
     Data : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomDocument_createCDATASection_QStringCR, "__QtAda_QDomDocument_createCDATASection_QStringCR");

   procedure QDomDocument_createComment_QStringCR
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access;
     Data : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomDocument_createComment_QStringCR, "__QtAda_QDomDocument_createComment_QStringCR");

   procedure QDomDocument_createDocumentFragment
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomDocument_createDocumentFragment, "__QtAda_QDomDocument_createDocumentFragment");

   procedure QDomDocument_createElement_QStringCR
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access;
     Tag_Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomDocument_createElement_QStringCR, "__QtAda_QDomDocument_createElement_QStringCR");

   procedure QDomDocument_createElementNS_QStringCR_QStringCR
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access;
     Ns_URI : Qt4.Strings.Internals.QString_Access;
     Q_Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomDocument_createElementNS_QStringCR_QStringCR, "__QtAda_QDomDocument_createElementNS_QStringCR_QStringCR");

   procedure QDomDocument_createEntityReference_QStringCR
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access;
     Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomDocument_createEntityReference_QStringCR, "__QtAda_QDomDocument_createEntityReference_QStringCR");

   procedure QDomDocument_createProcessingInstruction_QStringCR_QStringCR
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access;
     Target : Qt4.Strings.Internals.QString_Access;
     Data : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomDocument_createProcessingInstruction_QStringCR_QStringCR, "__QtAda_QDomDocument_createProcessingInstruction_QStringCR_QStringCR");

   procedure QDomDocument_createTextNode_QStringCR
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access;
     Data : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomDocument_createTextNode_QStringCR, "__QtAda_QDomDocument_createTextNode_QStringCR");

   procedure QDomDocument_doctype
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomDocument_doctype, "__QtAda_QDomDocument_doctype_Q");

   procedure QDomDocument_documentElement
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomDocument_documentElement, "__QtAda_QDomDocument_documentElement_Q");

   procedure QDomDocument_elementById_QStringCR
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access;
     Element_Id : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomDocument_elementById_QStringCR, "__QtAda_QDomDocument_elementById_QStringCR");

   procedure QDomDocument_elementsByTagName_QStringCR
    (Returns : Internals.QDomNodeList_Access;
     Self : Internals.QDomNode_Access;
     Tagname : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomDocument_elementsByTagName_QStringCR, "__QtAda_QDomDocument_elementsByTagName_QStringCR_Q");

   procedure QDomDocument_elementsByTagNameNS_QStringCR_QStringCR
    (Returns : Internals.QDomNodeList_Access;
     Self : Internals.QDomNode_Access;
     Ns_URI : Qt4.Strings.Internals.QString_Access;
     Local_Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomDocument_elementsByTagNameNS_QStringCR_QStringCR, "__QtAda_QDomDocument_elementsByTagNameNS_QStringCR_QStringCR");

   procedure QDomDocument_implementation
    (Returns : Internals.QDomImplementation_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomDocument_implementation, "__QtAda_QDomDocument_implementation_Q");

   procedure QDomDocument_importNode_QDomNodeCR_bool
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access;
     Imported_Node : Internals.QDomNode_Access;
     Deep : Interfaces.C.unsigned);
   pragma Import (C, QDomDocument_importNode_QDomNodeCR_bool, "__QtAda_QDomDocument_importNode_QDomNodeCR_bool");

   function QDomDocument_nodeType
    (Self : Internals.QDomNode_Access)
       return Dom_Node_Type;
   pragma Import (C, QDomDocument_nodeType, "__QtAda_QDomDocument_nodeType_Q");

   function QDomDocument_setContent_QStringCR_bool
    (Self : Internals.QDomNode_Access;
     Text : Qt4.Strings.Internals.QString_Access;
     Namespace_Processing : Interfaces.C.unsigned)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomDocument_setContent_QStringCR_bool, "__QtAda_QDomDocument_setContent_QStringCR_bool");

   function QDomDocument_setContent_QIODeviceP_QStringP_intP_intP
    (Self : Internals.QDomNode_Access;
     Dev : not null access Qt_Ada.Internals.Objects.QObject;
     Error_Msg : Qt4.Strings.Internals.QString_Access;
     Error_Line : access Qt4.Q_Integer;
     Error_Column : access Qt4.Q_Integer)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomDocument_setContent_QIODeviceP_QStringP_intP_intP, "__QtAda_QDomDocument_setContent_QIODeviceP_QStringP_intP_intP");

   procedure QDomDocument_toString_int
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access;
     Indent : Qt4.Q_Integer);
   pragma Import (C, QDomDocument_toString_int, "__QtAda_QDomDocument_toString_int_Q");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_Dom_Document) is
   begin
      Self.Object := adjust_QDomDocument (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_Dom_Document) is
   begin
      if not Self.Wrapper then
         finalize_QDomDocument (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_Dom_Document) is
      use type Internals.QDomNode_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QDomDocument (Self.Storage'Address);
      end if;
   end Initialize;

   ------------
   -- Create --
   ------------

   function Create
    (Name : Qt4.Strings.Q_String'Class)
       return Q_Dom_Document
   is
   begin
      return Self : Q_Dom_Document
        := (Ada.Finalization.Controlled with others => <>)
      do
         Self.Object := initialize_QDomDocument_QStringCR (Self.Storage'Address, Qt4.Strings.Internals.QString_View (Name));
      end return;
   end Create;

   ------------
   -- Create --
   ------------

   function Create
    (Doctype : Q_Dom_Document_Type'Class)
       return Q_Dom_Document
   is
   begin
      return Self : Q_Dom_Document
        := (Ada.Finalization.Controlled with others => <>)
      do
         Self.Object := initialize_QDomDocument_QDomDocumentTypeCR (Self.Storage'Address, Doctype.Object);
      end return;
   end Create;

   ----------------------
   -- Create_Attribute --
   ----------------------

   function Create_Attribute
    (Self : not null access Q_Dom_Document'Class;
     Name : Qt4.Strings.Q_String'Class)
       return Q_Dom_Attr
   is
   begin
      return Returns : Q_Dom_Attr do
         QDomDocument_createAttribute_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Name));
      end return;
   end Create_Attribute;

   -------------------------
   -- Create_Attribute_NS --
   -------------------------

   function Create_Attribute_NS
    (Self : not null access Q_Dom_Document'Class;
     Ns_URI : Qt4.Strings.Q_String'Class;
     Q_Name : Qt4.Strings.Q_String'Class)
       return Q_Dom_Attr
   is
   begin
      return Returns : Q_Dom_Attr do
         QDomDocument_createAttributeNS_QStringCR_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Ns_URI), Qt4.Strings.Internals.QString_View (Q_Name));
      end return;
   end Create_Attribute_NS;

   --------------------------
   -- Create_CDATA_Section --
   --------------------------

   function Create_CDATA_Section
    (Self : not null access Q_Dom_Document'Class;
     Data : Qt4.Strings.Q_String'Class)
       return Q_Dom_CDATA_Section
   is
   begin
      return Returns : Q_Dom_CDATA_Section do
         QDomDocument_createCDATASection_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Data));
      end return;
   end Create_CDATA_Section;

   --------------------
   -- Create_Comment --
   --------------------

   function Create_Comment
    (Self : not null access Q_Dom_Document'Class;
     Data : Qt4.Strings.Q_String'Class)
       return Q_Dom_Comment
   is
   begin
      return Returns : Q_Dom_Comment do
         QDomDocument_createComment_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Data));
      end return;
   end Create_Comment;

   ------------------------------
   -- Create_Document_Fragment --
   ------------------------------

   function Create_Document_Fragment
    (Self : not null access Q_Dom_Document'Class)
       return Q_Dom_Document_Fragment
   is
   begin
      return Returns : Q_Dom_Document_Fragment do
         QDomDocument_createDocumentFragment (Returns.Object, Self.Object);
      end return;
   end Create_Document_Fragment;

   --------------------
   -- Create_Element --
   --------------------

   function Create_Element
    (Self : not null access Q_Dom_Document'Class;
     Tag_Name : Qt4.Strings.Q_String'Class)
       return Q_Dom_Element
   is
   begin
      return Returns : Q_Dom_Element do
         QDomDocument_createElement_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Tag_Name));
      end return;
   end Create_Element;

   -----------------------
   -- Create_Element_NS --
   -----------------------

   function Create_Element_NS
    (Self : not null access Q_Dom_Document'Class;
     Ns_URI : Qt4.Strings.Q_String'Class;
     Q_Name : Qt4.Strings.Q_String'Class)
       return Q_Dom_Element
   is
   begin
      return Returns : Q_Dom_Element do
         QDomDocument_createElementNS_QStringCR_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Ns_URI), Qt4.Strings.Internals.QString_View (Q_Name));
      end return;
   end Create_Element_NS;

   -----------------------------
   -- Create_Entity_Reference --
   -----------------------------

   function Create_Entity_Reference
    (Self : not null access Q_Dom_Document'Class;
     Name : Qt4.Strings.Q_String'Class)
       return Q_Dom_Entity_Reference
   is
   begin
      return Returns : Q_Dom_Entity_Reference do
         QDomDocument_createEntityReference_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Name));
      end return;
   end Create_Entity_Reference;

   -----------------------------------
   -- Create_Processing_Instruction --
   -----------------------------------

   function Create_Processing_Instruction
    (Self : not null access Q_Dom_Document'Class;
     Target : Qt4.Strings.Q_String'Class;
     Data : Qt4.Strings.Q_String'Class)
       return Q_Dom_Processing_Instruction
   is
   begin
      return Returns : Q_Dom_Processing_Instruction do
         QDomDocument_createProcessingInstruction_QStringCR_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Target), Qt4.Strings.Internals.QString_View (Data));
      end return;
   end Create_Processing_Instruction;

   ----------------------
   -- Create_Text_Node --
   ----------------------

   function Create_Text_Node
    (Self : not null access Q_Dom_Document'Class;
     Data : Qt4.Strings.Q_String'Class)
       return Q_Dom_Text
   is
   begin
      return Returns : Q_Dom_Text do
         QDomDocument_createTextNode_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Data));
      end return;
   end Create_Text_Node;

   -------------
   -- Doctype --
   -------------

   function Doctype
    (Self : Q_Dom_Document'Class)
       return Q_Dom_Document_Type
   is
   begin
      return Returns : Q_Dom_Document_Type do
         QDomDocument_doctype (Returns.Object, Self.Object);
      end return;
   end Doctype;

   ----------------------
   -- Document_Element --
   ----------------------

   function Document_Element
    (Self : Q_Dom_Document'Class)
       return Q_Dom_Element
   is
   begin
      return Returns : Q_Dom_Element do
         QDomDocument_documentElement (Returns.Object, Self.Object);
      end return;
   end Document_Element;

   -------------------
   -- Element_By_Id --
   -------------------

   function Element_By_Id
    (Self : not null access Q_Dom_Document'Class;
     Element_Id : Qt4.Strings.Q_String'Class)
       return Q_Dom_Element
   is
   begin
      return Returns : Q_Dom_Element do
         QDomDocument_elementById_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Element_Id));
      end return;
   end Element_By_Id;

   --------------------------
   -- Elements_By_Tag_Name --
   --------------------------

   function Elements_By_Tag_Name
    (Self : Q_Dom_Document'Class;
     Tagname : Qt4.Strings.Q_String'Class)
       return Q_Dom_Node_List
   is
   begin
      return Returns : Q_Dom_Node_List do
         QDomDocument_elementsByTagName_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Tagname));
      end return;
   end Elements_By_Tag_Name;

   -----------------------------
   -- Elements_By_Tag_Name_NS --
   -----------------------------

   function Elements_By_Tag_Name_NS
    (Self : not null access Q_Dom_Document'Class;
     Ns_URI : Qt4.Strings.Q_String'Class;
     Local_Name : Qt4.Strings.Q_String'Class)
       return Q_Dom_Node_List
   is
   begin
      return Returns : Q_Dom_Node_List do
         QDomDocument_elementsByTagNameNS_QStringCR_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Ns_URI), Qt4.Strings.Internals.QString_View (Local_Name));
      end return;
   end Elements_By_Tag_Name_NS;

   --------------------
   -- Implementation --
   --------------------

   function Implementation
    (Self : Q_Dom_Document'Class)
       return Q_Dom_Implementation
   is
   begin
      return Returns : Q_Dom_Implementation do
         QDomDocument_implementation (Returns.Object, Self.Object);
      end return;
   end Implementation;

   -----------------
   -- Import_Node --
   -----------------

   function Import_Node
    (Self : not null access Q_Dom_Document'Class;
     Imported_Node : Q_Dom_Node'Class;
     Deep : Boolean)
       return Q_Dom_Node
   is
   begin
      return Returns : Q_Dom_Node do
         QDomDocument_importNode_QDomNodeCR_bool (Returns.Object, Self.Object, Imported_Node.Object, Qt_Ada.Internals.Boolean_Conversions.To_unsigned (Deep));
      end return;
   end Import_Node;

   ---------------
   -- Node_Type --
   ---------------

   function Node_Type
    (Self : Q_Dom_Document'Class)
       return Dom_Node_Type
   is
   begin
      return QDomDocument_nodeType (Self.Object);
   end Node_Type;

   -----------------
   -- Set_Content --
   -----------------

   function Set_Content
    (Self : not null access Q_Dom_Document'Class;
     Text : Qt4.Strings.Q_String'Class;
     Namespace_Processing : Boolean)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomDocument_setContent_QStringCR_bool (Self.Object, Qt4.Strings.Internals.QString_View (Text), Qt_Ada.Internals.Boolean_Conversions.To_unsigned (Namespace_Processing)), 0);
   end Set_Content;

   -----------------
   -- Set_Content --
   -----------------

   function Set_Content
    (Self : not null access Q_Dom_Document'Class;
     Dev : not null access Qt4.IO_Devices.Q_IO_Device'Class;
     Error_Msg : access Qt4.Strings.Q_String := null;
     Error_Line : access Qt4.Q_Integer := null;
     Error_Column : access Qt4.Q_Integer := null)
       return Boolean
   is
      C_Error_Msg : Qt4.Strings.Internals.QString_Access;

   begin
      if Error_Msg /= null then
         C_Error_Msg := Qt4.Strings.Internals.QString_View (Error_Msg.all);
      end if;

      return Interfaces.C."/=" (QDomDocument_setContent_QIODeviceP_QStringP_intP_intP (Self.Object, Dev.QObject_View, C_Error_Msg, Error_Line, Error_Column), 0);
   end Set_Content;

   ---------------
   -- To_String --
   ---------------

   function To_String
    (Self : Q_Dom_Document'Class;
     Indent : Qt4.Q_Integer
       := 1)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomDocument_toString_int (Qt4.Strings.Internals.QString_View (Returns), Self.Object, Indent);
      end return;
   end To_String;

   function initialize_QDomDocumentFragment
    (Storage : System.Address)
      return Internals.QDomNode_Access;
   pragma Import (C, initialize_QDomDocumentFragment, "__QtAda_inititialize_QDomDocumentFragment");

   function adjust_QDomDocumentFragment
    (Storage : System.Address;
     From    : Internals.QDomNode_Access)
       return Internals.QDomNode_Access;
   pragma Import (C, adjust_QDomDocumentFragment, "__QtAda_adjust_QDomDocumentFragment");

   procedure finalize_QDomDocumentFragment (Object : Internals.QDomNode_Access);
   pragma Import (C, finalize_QDomDocumentFragment, "__QtAda_finalize_QDomDocumentFragment");

   function QDomDocumentFragment_nodeType
    (Self : Internals.QDomNode_Access)
       return Dom_Node_Type;
   pragma Import (C, QDomDocumentFragment_nodeType, "__QtAda_QDomDocumentFragment_nodeType_Q");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_Dom_Document_Fragment) is
   begin
      Self.Object := adjust_QDomDocumentFragment (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_Dom_Document_Fragment) is
   begin
      if not Self.Wrapper then
         finalize_QDomDocumentFragment (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_Dom_Document_Fragment) is
      use type Internals.QDomNode_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QDomDocumentFragment (Self.Storage'Address);
      end if;
   end Initialize;

   ---------------
   -- Node_Type --
   ---------------

   function Node_Type
    (Self : Q_Dom_Document_Fragment'Class)
       return Dom_Node_Type
   is
   begin
      return QDomDocumentFragment_nodeType (Self.Object);
   end Node_Type;

   function initialize_QDomDocumentType
    (Storage : System.Address)
      return Internals.QDomNode_Access;
   pragma Import (C, initialize_QDomDocumentType, "__QtAda_inititialize_QDomDocumentType");

   function adjust_QDomDocumentType
    (Storage : System.Address;
     From    : Internals.QDomNode_Access)
       return Internals.QDomNode_Access;
   pragma Import (C, adjust_QDomDocumentType, "__QtAda_adjust_QDomDocumentType");

   procedure finalize_QDomDocumentType (Object : Internals.QDomNode_Access);
   pragma Import (C, finalize_QDomDocumentType, "__QtAda_finalize_QDomDocumentType");

   procedure QDomDocumentType_entities
    (Returns : Internals.QDomNamedNodeMap_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomDocumentType_entities, "__QtAda_QDomDocumentType_entities_Q");

   procedure QDomDocumentType_internalSubset
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomDocumentType_internalSubset, "__QtAda_QDomDocumentType_internalSubset_Q");

   procedure QDomDocumentType_name
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomDocumentType_name, "__QtAda_QDomDocumentType_name_Q");

   function QDomDocumentType_nodeType
    (Self : Internals.QDomNode_Access)
       return Dom_Node_Type;
   pragma Import (C, QDomDocumentType_nodeType, "__QtAda_QDomDocumentType_nodeType_Q");

   procedure QDomDocumentType_notations
    (Returns : Internals.QDomNamedNodeMap_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomDocumentType_notations, "__QtAda_QDomDocumentType_notations_Q");

   procedure QDomDocumentType_publicId
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomDocumentType_publicId, "__QtAda_QDomDocumentType_publicId_Q");

   procedure QDomDocumentType_systemId
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomDocumentType_systemId, "__QtAda_QDomDocumentType_systemId_Q");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_Dom_Document_Type) is
   begin
      Self.Object := adjust_QDomDocumentType (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_Dom_Document_Type) is
   begin
      if not Self.Wrapper then
         finalize_QDomDocumentType (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_Dom_Document_Type) is
      use type Internals.QDomNode_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QDomDocumentType (Self.Storage'Address);
      end if;
   end Initialize;

   --------------
   -- Entities --
   --------------

   function Entities
    (Self : Q_Dom_Document_Type'Class)
       return Q_Dom_Named_Node_Map
   is
   begin
      return Returns : Q_Dom_Named_Node_Map do
         QDomDocumentType_entities (Returns.Object, Self.Object);
      end return;
   end Entities;

   ---------------------
   -- Internal_Subset --
   ---------------------

   function Internal_Subset
    (Self : Q_Dom_Document_Type'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomDocumentType_internalSubset (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Internal_Subset;

   ----------
   -- Name --
   ----------

   function Name
    (Self : Q_Dom_Document_Type'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomDocumentType_name (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Name;

   ---------------
   -- Node_Type --
   ---------------

   function Node_Type
    (Self : Q_Dom_Document_Type'Class)
       return Dom_Node_Type
   is
   begin
      return QDomDocumentType_nodeType (Self.Object);
   end Node_Type;

   ---------------
   -- Notations --
   ---------------

   function Notations
    (Self : Q_Dom_Document_Type'Class)
       return Q_Dom_Named_Node_Map
   is
   begin
      return Returns : Q_Dom_Named_Node_Map do
         QDomDocumentType_notations (Returns.Object, Self.Object);
      end return;
   end Notations;

   ---------------
   -- Public_Id --
   ---------------

   function Public_Id
    (Self : Q_Dom_Document_Type'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomDocumentType_publicId (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Public_Id;

   ---------------
   -- System_Id --
   ---------------

   function System_Id
    (Self : Q_Dom_Document_Type'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomDocumentType_systemId (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end System_Id;

   function initialize_QDomElement
    (Storage : System.Address)
      return Internals.QDomNode_Access;
   pragma Import (C, initialize_QDomElement, "__QtAda_inititialize_QDomElement");

   function adjust_QDomElement
    (Storage : System.Address;
     From    : Internals.QDomNode_Access)
       return Internals.QDomNode_Access;
   pragma Import (C, adjust_QDomElement, "__QtAda_adjust_QDomElement");

   procedure finalize_QDomElement (Object : Internals.QDomNode_Access);
   pragma Import (C, finalize_QDomElement, "__QtAda_finalize_QDomElement");

   procedure QDomElement_attribute_QStringCR_QStringCR
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access;
     Name : Qt4.Strings.Internals.QString_Access;
     Def_Value : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomElement_attribute_QStringCR_QStringCR, "__QtAda_QDomElement_attribute_QStringCR_QStringCR_Q");

   procedure QDomElement_attributeNS_QStringCR_QStringCR_QStringCR
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access;
     Ns_URI : Qt4.Strings.Internals.QString_Access;
     Local_Name : Qt4.Strings.Internals.QString_Access;
     Def_Value : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomElement_attributeNS_QStringCR_QStringCR_QStringCR, "__QtAda_QDomElement_attributeNS_QStringCR_QStringCR_QStringCR_Q");

   procedure QDomElement_attributes
    (Returns : Internals.QDomNamedNodeMap_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomElement_attributes, "__QtAda_QDomElement_attributes_Q");

   procedure QDomElement_elementsByTagName_QStringCR
    (Returns : Internals.QDomNodeList_Access;
     Self : Internals.QDomNode_Access;
     Tagname : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomElement_elementsByTagName_QStringCR, "__QtAda_QDomElement_elementsByTagName_QStringCR_Q");

   procedure QDomElement_elementsByTagNameNS_QStringCR_QStringCR
    (Returns : Internals.QDomNodeList_Access;
     Self : Internals.QDomNode_Access;
     Ns_URI : Qt4.Strings.Internals.QString_Access;
     Local_Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomElement_elementsByTagNameNS_QStringCR_QStringCR, "__QtAda_QDomElement_elementsByTagNameNS_QStringCR_QStringCR_Q");

   function QDomElement_hasAttribute_QStringCR
    (Self : Internals.QDomNode_Access;
     Name : Qt4.Strings.Internals.QString_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomElement_hasAttribute_QStringCR, "__QtAda_QDomElement_hasAttribute_QStringCR_Q");

   function QDomElement_hasAttributeNS_QStringCR_QStringCR
    (Self : Internals.QDomNode_Access;
     Ns_URI : Qt4.Strings.Internals.QString_Access;
     Local_Name : Qt4.Strings.Internals.QString_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomElement_hasAttributeNS_QStringCR_QStringCR, "__QtAda_QDomElement_hasAttributeNS_QStringCR_QStringCR_Q");

   function QDomElement_nodeType
    (Self : Internals.QDomNode_Access)
       return Dom_Node_Type;
   pragma Import (C, QDomElement_nodeType, "__QtAda_QDomElement_nodeType_Q");

   procedure QDomElement_removeAttribute_QStringCR
    (Self : Internals.QDomNode_Access;
     Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomElement_removeAttribute_QStringCR, "__QtAda_QDomElement_removeAttribute_QStringCR");

   procedure QDomElement_removeAttributeNS_QStringCR_QStringCR
    (Self : Internals.QDomNode_Access;
     Ns_URI : Qt4.Strings.Internals.QString_Access;
     Local_Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomElement_removeAttributeNS_QStringCR_QStringCR, "__QtAda_QDomElement_removeAttributeNS_QStringCR_QStringCR");

   procedure QDomElement_setAttribute_QStringCR_QStringCR
    (Self : Internals.QDomNode_Access;
     Name : Qt4.Strings.Internals.QString_Access;
     Value : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomElement_setAttribute_QStringCR_QStringCR, "__QtAda_QDomElement_setAttribute_QStringCR_QStringCR");

   procedure QDomElement_setAttributeNS_QStringCR_QStringCR_QStringCR
    (Self : Internals.QDomNode_Access;
     Ns_URI : Qt4.Strings.Internals.QString_Access;
     Q_Name : Qt4.Strings.Internals.QString_Access;
     Value : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomElement_setAttributeNS_QStringCR_QStringCR_QStringCR, "__QtAda_QDomElement_setAttributeNS_QStringCR_QStringCR_QStringCR");

   procedure QDomElement_setAttributeNode_QDomAttrCR
    (Self : Internals.QDomNode_Access;
     New_Attr : Internals.QDomNode_Access);
   pragma Import (C, QDomElement_setAttributeNode_QDomAttrCR, "__QtAda_QDomElement_setAttributeNode_QDomAttrCR");

   procedure QDomElement_setAttributeNodeNS_QDomAttrCR
    (Self : Internals.QDomNode_Access;
     New_Attr : Internals.QDomNode_Access);
   pragma Import (C, QDomElement_setAttributeNodeNS_QDomAttrCR, "__QtAda_QDomElement_setAttributeNodeNS_QDomAttrCR");

   procedure QDomElement_setTagName_QStringCR
    (Self : Internals.QDomNode_Access;
     Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomElement_setTagName_QStringCR, "__QtAda_QDomElement_setTagName_QStringCR");

   procedure QDomElement_tagName
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomElement_tagName, "__QtAda_QDomElement_tagName_Q");

   procedure QDomElement_text
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomElement_text, "__QtAda_QDomElement_text_Q");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_Dom_Element) is
   begin
      Self.Object := adjust_QDomElement (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_Dom_Element) is
   begin
      if not Self.Wrapper then
         finalize_QDomElement (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_Dom_Element) is
      use type Internals.QDomNode_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QDomElement (Self.Storage'Address);
      end if;
   end Initialize;

   ---------------
   -- Attribute --
   ---------------

   function Attribute
    (Self : Q_Dom_Element'Class;
     Name : Qt4.Strings.Q_String'Class;
     Def_Value : Qt4.Strings.Q_String'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomElement_attribute_QStringCR_QStringCR (Qt4.Strings.Internals.QString_View (Returns), Self.Object, Qt4.Strings.Internals.QString_View (Name), Qt4.Strings.Internals.QString_View (Def_Value));
      end return;
   end Attribute;

   ------------------
   -- Attribute_NS --
   ------------------

   function Attribute_NS
    (Self : Q_Dom_Element'Class;
     Ns_URI : Qt4.Strings.Q_String'Class;
     Local_Name : Qt4.Strings.Q_String'Class;
     Def_Value : Qt4.Strings.Q_String'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomElement_attributeNS_QStringCR_QStringCR_QStringCR
          (Qt4.Strings.Internals.QString_View (Returns),
           Self.Object,
           Qt4.Strings.Internals.QString_View (Ns_URI),
           Qt4.Strings.Internals.QString_View (Local_Name),
           Qt4.Strings.Internals.QString_View (Def_Value));
      end return;
   end Attribute_NS;

   ----------------
   -- Attributes --
   ----------------

   function Attributes
    (Self : Q_Dom_Element'Class)
       return Q_Dom_Named_Node_Map
   is
   begin
      return Returns : Q_Dom_Named_Node_Map do
         QDomElement_attributes (Returns.Object, Self.Object);
      end return;
   end Attributes;

   --------------------------
   -- Elements_By_Tag_Name --
   --------------------------

   function Elements_By_Tag_Name
    (Self : Q_Dom_Element'Class;
     Tagname : Qt4.Strings.Q_String'Class)
       return Q_Dom_Node_List
   is
   begin
      return Returns : Q_Dom_Node_List do
         QDomElement_elementsByTagName_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Tagname));
      end return;
   end Elements_By_Tag_Name;

   -----------------------------
   -- Elements_By_Tag_Name_NS --
   -----------------------------

   function Elements_By_Tag_Name_NS
    (Self : Q_Dom_Element'Class;
     Ns_URI : Qt4.Strings.Q_String'Class;
     Local_Name : Qt4.Strings.Q_String'Class)
       return Q_Dom_Node_List
   is
   begin
      return Returns : Q_Dom_Node_List do
         QDomElement_elementsByTagNameNS_QStringCR_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Ns_URI), Qt4.Strings.Internals.QString_View (Local_Name));
      end return;
   end Elements_By_Tag_Name_NS;

   -------------------
   -- Has_Attribute --
   -------------------

   function Has_Attribute
    (Self : Q_Dom_Element'Class;
     Name : Qt4.Strings.Q_String'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomElement_hasAttribute_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Name)), 0);
   end Has_Attribute;

   ----------------------
   -- Has_Attribute_NS --
   ----------------------

   function Has_Attribute_NS
    (Self : Q_Dom_Element'Class;
     Ns_URI : Qt4.Strings.Q_String'Class;
     Local_Name : Qt4.Strings.Q_String'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomElement_hasAttributeNS_QStringCR_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Ns_URI), Qt4.Strings.Internals.QString_View (Local_Name)), 0);
   end Has_Attribute_NS;

   ---------------
   -- Node_Type --
   ---------------

   function Node_Type
    (Self : Q_Dom_Element'Class)
       return Dom_Node_Type
   is
   begin
      return QDomElement_nodeType (Self.Object);
   end Node_Type;

   ----------------------
   -- Remove_Attribute --
   ----------------------

   procedure Remove_Attribute
    (Self : in out Q_Dom_Element'Class;
     Name : Qt4.Strings.Q_String'Class)
   is
   begin
      QDomElement_removeAttribute_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Name));
   end Remove_Attribute;

   -------------------------
   -- Remove_Attribute_NS --
   -------------------------

   procedure Remove_Attribute_NS
    (Self : in out Q_Dom_Element'Class;
     Ns_URI : Qt4.Strings.Q_String'Class;
     Local_Name : Qt4.Strings.Q_String'Class)
   is
   begin
      QDomElement_removeAttributeNS_QStringCR_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Ns_URI), Qt4.Strings.Internals.QString_View (Local_Name));
   end Remove_Attribute_NS;

   -------------------
   -- Set_Attribute --
   -------------------

   procedure Set_Attribute
    (Self : in out Q_Dom_Element'Class;
     Name : Qt4.Strings.Q_String'Class;
     Value : Qt4.Strings.Q_String'Class)
   is
   begin
      QDomElement_setAttribute_QStringCR_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Name), Qt4.Strings.Internals.QString_View (Value));
   end Set_Attribute;

   ----------------------
   -- Set_Attribute_NS --
   ----------------------

   procedure Set_Attribute_NS
    (Self : in out Q_Dom_Element'Class;
     Ns_URI : Qt4.Strings.Q_String'Class;
     Q_Name : Qt4.Strings.Q_String'Class;
     Value : Qt4.Strings.Q_String'Class)
   is
   begin
      QDomElement_setAttributeNS_QStringCR_QStringCR_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Ns_URI), Qt4.Strings.Internals.QString_View (Q_Name), Qt4.Strings.Internals.QString_View (Value));
   end Set_Attribute_NS;

   ------------------------
   -- Set_Attribute_Node --
   ------------------------

   procedure Set_Attribute_Node
    (Self : in out Q_Dom_Element'Class;
     New_Attr : Q_Dom_Attr'Class)
   is
   begin
      QDomElement_setAttributeNode_QDomAttrCR (Self.Object, New_Attr.Object);
   end Set_Attribute_Node;

   ---------------------------
   -- Set_Attribute_Node_NS --
   ---------------------------

   procedure Set_Attribute_Node_NS
    (Self : in out Q_Dom_Element'Class;
     New_Attr : Q_Dom_Attr'Class)
   is
   begin
      QDomElement_setAttributeNodeNS_QDomAttrCR (Self.Object, New_Attr.Object);
   end Set_Attribute_Node_NS;

   ------------------
   -- Set_Tag_Name --
   ------------------

   procedure Set_Tag_Name
    (Self : in out Q_Dom_Element'Class;
     Name : Qt4.Strings.Q_String'Class)
   is
   begin
      QDomElement_setTagName_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Name));
   end Set_Tag_Name;

   --------------
   -- Tag_Name --
   --------------

   function Tag_Name
    (Self : Q_Dom_Element'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomElement_tagName (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Tag_Name;

   ----------
   -- Text --
   ----------

   function Text
    (Self : Q_Dom_Element'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomElement_text (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Text;

   function initialize_QDomEntity
    (Storage : System.Address)
      return Internals.QDomNode_Access;
   pragma Import (C, initialize_QDomEntity, "__QtAda_inititialize_QDomEntity");

   function adjust_QDomEntity
    (Storage : System.Address;
     From    : Internals.QDomNode_Access)
       return Internals.QDomNode_Access;
   pragma Import (C, adjust_QDomEntity, "__QtAda_adjust_QDomEntity");

   procedure finalize_QDomEntity (Object : Internals.QDomNode_Access);
   pragma Import (C, finalize_QDomEntity, "__QtAda_finalize_QDomEntity");

   function QDomEntity_nodeType
    (Self : Internals.QDomNode_Access)
       return Dom_Node_Type;
   pragma Import (C, QDomEntity_nodeType, "__QtAda_QDomEntity_nodeType_Q");

   procedure QDomEntity_notationName
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomEntity_notationName, "__QtAda_QDomEntity_notationName_Q");

   procedure QDomEntity_publicId
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomEntity_publicId, "__QtAda_QDomEntity_publicId_Q");

   procedure QDomEntity_systemId
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomEntity_systemId, "__QtAda_QDomEntity_systemId_Q");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_Dom_Entity) is
   begin
      Self.Object := adjust_QDomEntity (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_Dom_Entity) is
   begin
      if not Self.Wrapper then
         finalize_QDomEntity (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_Dom_Entity) is
      use type Internals.QDomNode_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QDomEntity (Self.Storage'Address);
      end if;
   end Initialize;

   ---------------
   -- Node_Type --
   ---------------

   function Node_Type
    (Self : Q_Dom_Entity'Class)
       return Dom_Node_Type
   is
   begin
      return QDomEntity_nodeType (Self.Object);
   end Node_Type;

   -------------------
   -- Notation_Name --
   -------------------

   function Notation_Name
    (Self : Q_Dom_Entity'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomEntity_notationName (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Notation_Name;

   ---------------
   -- Public_Id --
   ---------------

   function Public_Id
    (Self : Q_Dom_Entity'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomEntity_publicId (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Public_Id;

   ---------------
   -- System_Id --
   ---------------

   function System_Id
    (Self : Q_Dom_Entity'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomEntity_systemId (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end System_Id;

   function initialize_QDomEntityReference
    (Storage : System.Address)
      return Internals.QDomNode_Access;
   pragma Import (C, initialize_QDomEntityReference, "__QtAda_inititialize_QDomEntityReference");

   function adjust_QDomEntityReference
    (Storage : System.Address;
     From    : Internals.QDomNode_Access)
       return Internals.QDomNode_Access;
   pragma Import (C, adjust_QDomEntityReference, "__QtAda_adjust_QDomEntityReference");

   procedure finalize_QDomEntityReference (Object : Internals.QDomNode_Access);
   pragma Import (C, finalize_QDomEntityReference, "__QtAda_finalize_QDomEntityReference");

   function QDomEntityReference_nodeType
    (Self : Internals.QDomNode_Access)
       return Dom_Node_Type;
   pragma Import (C, QDomEntityReference_nodeType, "__QtAda_QDomEntityReference_nodeType_Q");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_Dom_Entity_Reference) is
   begin
      Self.Object := adjust_QDomEntityReference (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_Dom_Entity_Reference) is
   begin
      if not Self.Wrapper then
         finalize_QDomEntityReference (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_Dom_Entity_Reference) is
      use type Internals.QDomNode_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QDomEntityReference (Self.Storage'Address);
      end if;
   end Initialize;

   ---------------
   -- Node_Type --
   ---------------

   function Node_Type
    (Self : Q_Dom_Entity_Reference'Class)
       return Dom_Node_Type
   is
   begin
      return QDomEntityReference_nodeType (Self.Object);
   end Node_Type;

   function initialize_QDomImplementation
    (Storage : System.Address)
      return Internals.QDomImplementation_Access;
   pragma Import (C, initialize_QDomImplementation, "__QtAda_inititialize_QDomImplementation");

   function adjust_QDomImplementation
    (Storage : System.Address;
     From    : Internals.QDomImplementation_Access)
       return Internals.QDomImplementation_Access;
   pragma Import (C, adjust_QDomImplementation, "__QtAda_adjust_QDomImplementation");

   procedure finalize_QDomImplementation (Object : Internals.QDomImplementation_Access);
   pragma Import (C, finalize_QDomImplementation, "__QtAda_finalize_QDomImplementation");

   procedure QDomImplementation_createDocument_QStringCR_QStringCR_QDomDocumentTypeCR
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomImplementation_Access;
     Ns_URI : Qt4.Strings.Internals.QString_Access;
     Q_Name : Qt4.Strings.Internals.QString_Access;
     Doctype : Internals.QDomNode_Access);
   pragma Import (C, QDomImplementation_createDocument_QStringCR_QStringCR_QDomDocumentTypeCR, "__QtAda_QDomImplementation_createDocument_QStringCR_QStringCR_QDomDocumentTypeCR");

   procedure QDomImplementation_createDocumentType_QStringCR_QStringCR_QStringCR
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomImplementation_Access;
     Q_Name : Qt4.Strings.Internals.QString_Access;
     Public_Id : Qt4.Strings.Internals.QString_Access;
     System_Id : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomImplementation_createDocumentType_QStringCR_QStringCR_QStringCR, "__QtAda_QDomImplementation_createDocumentType_QStringCR_QStringCR_QStringCR");

   function QDomImplementation_hasFeature_QStringCR_QStringCR
    (Self : Internals.QDomImplementation_Access;
     Feature : Qt4.Strings.Internals.QString_Access;
     Version : Qt4.Strings.Internals.QString_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomImplementation_hasFeature_QStringCR_QStringCR, "__QtAda_QDomImplementation_hasFeature_QStringCR_QStringCR_Q");

   function QDomImplementation_isNull
    (Self : Internals.QDomImplementation_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomImplementation_isNull, "__QtAda_QDomImplementation_isNull");

   function eq_QDomImplementationCR
    (Self : Internals.QDomImplementation_Access;
     X : Internals.QDomImplementation_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, eq_QDomImplementationCR, "__QtAda_QDomImplementation_eq_QDomImplementationCR_Q");

   function QDomImplementation_invalidDataPolicy
     return Dom_Invalid_Data_Policy;
   pragma Import (C, QDomImplementation_invalidDataPolicy, "__QtAda_QDomImplementation_invalidDataPolicy_S");

   procedure QDomImplementation_setInvalidDataPolicy_InvalidDataPolicy
    (Policy : Dom_Invalid_Data_Policy);
   pragma Import (C, QDomImplementation_setInvalidDataPolicy_InvalidDataPolicy, "__QtAda_QDomImplementation_setInvalidDataPolicy_InvalidDataPolicy_S");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_Dom_Implementation) is
   begin
      Self.Object := adjust_QDomImplementation (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_Dom_Implementation) is
   begin
      if not Self.Wrapper then
         finalize_QDomImplementation (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_Dom_Implementation) is
      use type Internals.QDomImplementation_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QDomImplementation (Self.Storage'Address);
      end if;
   end Initialize;

   ---------------------
   -- Create_Document --
   ---------------------

   function Create_Document
    (Self : not null access Q_Dom_Implementation'Class;
     Ns_URI : Qt4.Strings.Q_String'Class;
     Q_Name : Qt4.Strings.Q_String'Class;
     Doctype : Q_Dom_Document_Type'Class)
       return Q_Dom_Document
   is
   begin
      return Returns : Q_Dom_Document do
         QDomImplementation_createDocument_QStringCR_QStringCR_QDomDocumentTypeCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Ns_URI), Qt4.Strings.Internals.QString_View (Q_Name), Doctype.Object);
      end return;
   end Create_Document;

   --------------------------
   -- Create_Document_Type --
   --------------------------

   function Create_Document_Type
    (Self : not null access Q_Dom_Implementation'Class;
     Q_Name : Qt4.Strings.Q_String'Class;
     Public_Id : Qt4.Strings.Q_String'Class;
     System_Id : Qt4.Strings.Q_String'Class)
       return Q_Dom_Document_Type
   is
   begin
      return Returns : Q_Dom_Document_Type do
         QDomImplementation_createDocumentType_QStringCR_QStringCR_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Q_Name), Qt4.Strings.Internals.QString_View (Public_Id), Qt4.Strings.Internals.QString_View (System_Id));
      end return;
   end Create_Document_Type;

   -----------------
   -- Has_Feature --
   -----------------

   function Has_Feature
    (Self : Q_Dom_Implementation'Class;
     Feature : Qt4.Strings.Q_String'Class;
     Version : Qt4.Strings.Q_String'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomImplementation_hasFeature_QStringCR_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Feature), Qt4.Strings.Internals.QString_View (Version)), 0);
   end Has_Feature;

   -------------
   -- Is_Null --
   -------------

   function Is_Null
    (Self : not null access Q_Dom_Implementation'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomImplementation_isNull (Self.Object), 0);
   end Is_Null;

   ---------
   -- "=" --
   ---------

   overriding function "="
    (Self : Q_Dom_Implementation;
     X : Q_Dom_Implementation)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (eq_QDomImplementationCR (Self.Object, X.Object), 0);
   end "=";

   -------------------------
   -- Invalid_Data_Policy --
   -------------------------

   function Invalid_Data_Policy
     return Dom_Invalid_Data_Policy
   is
   begin
      return QDomImplementation_invalidDataPolicy;
   end Invalid_Data_Policy;

   -----------------------------
   -- Set_Invalid_Data_Policy --
   -----------------------------

   procedure Set_Invalid_Data_Policy
    (Policy : Dom_Invalid_Data_Policy)
   is
   begin
      QDomImplementation_setInvalidDataPolicy_InvalidDataPolicy (Policy);
   end Set_Invalid_Data_Policy;

   function initialize_QDomNamedNodeMap
    (Storage : System.Address)
      return Internals.QDomNamedNodeMap_Access;
   pragma Import (C, initialize_QDomNamedNodeMap, "__QtAda_inititialize_QDomNamedNodeMap");

   function adjust_QDomNamedNodeMap
    (Storage : System.Address;
     From    : Internals.QDomNamedNodeMap_Access)
       return Internals.QDomNamedNodeMap_Access;
   pragma Import (C, adjust_QDomNamedNodeMap, "__QtAda_adjust_QDomNamedNodeMap");

   procedure finalize_QDomNamedNodeMap (Object : Internals.QDomNamedNodeMap_Access);
   pragma Import (C, finalize_QDomNamedNodeMap, "__QtAda_finalize_QDomNamedNodeMap");

   function QDomNamedNodeMap_contains_QStringCR
    (Self : Internals.QDomNamedNodeMap_Access;
     Name : Qt4.Strings.Internals.QString_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNamedNodeMap_contains_QStringCR, "__QtAda_QDomNamedNodeMap_contains_QStringCR_Q");

   function QDomNamedNodeMap_count
    (Self : Internals.QDomNamedNodeMap_Access)
       return Qt4.Q_Integer;
   pragma Import (C, QDomNamedNodeMap_count, "__QtAda_QDomNamedNodeMap_count_Q");

   function QDomNamedNodeMap_isEmpty
    (Self : Internals.QDomNamedNodeMap_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNamedNodeMap_isEmpty, "__QtAda_QDomNamedNodeMap_isEmpty_Q");

   procedure QDomNamedNodeMap_item_int
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNamedNodeMap_Access;
     Index : Qt4.Q_Integer);
   pragma Import (C, QDomNamedNodeMap_item_int, "__QtAda_QDomNamedNodeMap_item_int_Q");

   function QDomNamedNodeMap_length
    (Self : Internals.QDomNamedNodeMap_Access)
       return Qt4.Q_Unsigned_Integer;
   pragma Import (C, QDomNamedNodeMap_length, "__QtAda_QDomNamedNodeMap_length_Q");

   procedure QDomNamedNodeMap_namedItem_QStringCR
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNamedNodeMap_Access;
     Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomNamedNodeMap_namedItem_QStringCR, "__QtAda_QDomNamedNodeMap_namedItem_QStringCR_Q");

   procedure QDomNamedNodeMap_namedItemNS_QStringCR_QStringCR
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNamedNodeMap_Access;
     Ns_URI : Qt4.Strings.Internals.QString_Access;
     Local_Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomNamedNodeMap_namedItemNS_QStringCR_QStringCR, "__QtAda_QDomNamedNodeMap_namedItemNS_QStringCR_QStringCR_Q");

   procedure QDomNamedNodeMap_removeNamedItem_QStringCR
    (Self : Internals.QDomNamedNodeMap_Access;
     Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomNamedNodeMap_removeNamedItem_QStringCR, "__QtAda_QDomNamedNodeMap_removeNamedItem_QStringCR");

   procedure QDomNamedNodeMap_removeNamedItemNS_QStringCR_QStringCR
    (Self : Internals.QDomNamedNodeMap_Access;
     Ns_URI : Qt4.Strings.Internals.QString_Access;
     Local_Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomNamedNodeMap_removeNamedItemNS_QStringCR_QStringCR, "__QtAda_QDomNamedNodeMap_removeNamedItemNS_QStringCR_QStringCR");

   procedure QDomNamedNodeMap_setNamedItem_QDomNodeCR
    (Self : Internals.QDomNamedNodeMap_Access;
     New_Node : Internals.QDomNode_Access);
   pragma Import (C, QDomNamedNodeMap_setNamedItem_QDomNodeCR, "__QtAda_QDomNamedNodeMap_setNamedItem_QDomNodeCR");

   procedure QDomNamedNodeMap_setNamedItemNS_QDomNodeCR
    (Self : Internals.QDomNamedNodeMap_Access;
     New_Node : Internals.QDomNode_Access);
   pragma Import (C, QDomNamedNodeMap_setNamedItemNS_QDomNodeCR, "__QtAda_QDomNamedNodeMap_setNamedItemNS_QDomNodeCR");

   function QDomNamedNodeMap_size
    (Self : Internals.QDomNamedNodeMap_Access)
       return Qt4.Q_Integer;
   pragma Import (C, QDomNamedNodeMap_size, "__QtAda_QDomNamedNodeMap_size_Q");

   function eq_QDomNamedNodeMapCR
    (Self : Internals.QDomNamedNodeMap_Access;
     N : Internals.QDomNamedNodeMap_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, eq_QDomNamedNodeMapCR, "__QtAda_QDomNamedNodeMap_eq_QDomNamedNodeMapCR_Q");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_Dom_Named_Node_Map) is
   begin
      Self.Object := adjust_QDomNamedNodeMap (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_Dom_Named_Node_Map) is
   begin
      if not Self.Wrapper then
         finalize_QDomNamedNodeMap (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_Dom_Named_Node_Map) is
      use type Internals.QDomNamedNodeMap_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QDomNamedNodeMap (Self.Storage'Address);
      end if;
   end Initialize;

   --------------
   -- Contains --
   --------------

   function Contains
    (Self : Q_Dom_Named_Node_Map'Class;
     Name : Qt4.Strings.Q_String'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNamedNodeMap_contains_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Name)), 0);
   end Contains;

   -----------
   -- Count --
   -----------

   function Count
    (Self : Q_Dom_Named_Node_Map'Class)
       return Qt4.Q_Integer
   is
   begin
      return QDomNamedNodeMap_count (Self.Object);
   end Count;

   --------------
   -- Is_Empty --
   --------------

   function Is_Empty
    (Self : Q_Dom_Named_Node_Map'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNamedNodeMap_isEmpty (Self.Object), 0);
   end Is_Empty;

   ----------
   -- Item --
   ----------

   function Item
    (Self : Q_Dom_Named_Node_Map'Class;
     Index : Qt4.Q_Integer)
       return Q_Dom_Node
   is
   begin
      return Returns : Q_Dom_Node do
         QDomNamedNodeMap_item_int (Returns.Object, Self.Object, Index);
      end return;
   end Item;

   ------------
   -- Length --
   ------------

   function Length
    (Self : Q_Dom_Named_Node_Map'Class)
       return Qt4.Q_Unsigned_Integer
   is
   begin
      return QDomNamedNodeMap_length (Self.Object);
   end Length;

   ----------------
   -- Named_Item --
   ----------------

   function Named_Item
    (Self : Q_Dom_Named_Node_Map'Class;
     Name : Qt4.Strings.Q_String'Class)
       return Q_Dom_Node
   is
   begin
      return Returns : Q_Dom_Node do
         QDomNamedNodeMap_namedItem_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Name));
      end return;
   end Named_Item;

   -------------------
   -- Named_Item_NS --
   -------------------

   function Named_Item_NS
    (Self : Q_Dom_Named_Node_Map'Class;
     Ns_URI : Qt4.Strings.Q_String'Class;
     Local_Name : Qt4.Strings.Q_String'Class)
       return Q_Dom_Node
   is
   begin
      return Returns : Q_Dom_Node do
         QDomNamedNodeMap_namedItemNS_QStringCR_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Ns_URI), Qt4.Strings.Internals.QString_View (Local_Name));
      end return;
   end Named_Item_NS;

   -----------------------
   -- Remove_Named_Item --
   -----------------------

   procedure Remove_Named_Item
    (Self : in out Q_Dom_Named_Node_Map'Class;
     Name : Qt4.Strings.Q_String'Class)
   is
   begin
      QDomNamedNodeMap_removeNamedItem_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Name));
   end Remove_Named_Item;

   --------------------------
   -- Remove_Named_Item_NS --
   --------------------------

   procedure Remove_Named_Item_NS
    (Self : in out Q_Dom_Named_Node_Map'Class;
     Ns_URI : Qt4.Strings.Q_String'Class;
     Local_Name : Qt4.Strings.Q_String'Class)
   is
   begin
      QDomNamedNodeMap_removeNamedItemNS_QStringCR_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Ns_URI), Qt4.Strings.Internals.QString_View (Local_Name));
   end Remove_Named_Item_NS;

   --------------------
   -- Set_Named_Item --
   --------------------

   procedure Set_Named_Item
    (Self : in out Q_Dom_Named_Node_Map'Class;
     New_Node : Q_Dom_Node'Class)
   is
   begin
      QDomNamedNodeMap_setNamedItem_QDomNodeCR (Self.Object, New_Node.Object);
   end Set_Named_Item;

   -----------------------
   -- Set_Named_Item_NS --
   -----------------------

   procedure Set_Named_Item_NS
    (Self : in out Q_Dom_Named_Node_Map'Class;
     New_Node : Q_Dom_Node'Class)
   is
   begin
      QDomNamedNodeMap_setNamedItemNS_QDomNodeCR (Self.Object, New_Node.Object);
   end Set_Named_Item_NS;

   ----------
   -- Size --
   ----------

   function Size
    (Self : Q_Dom_Named_Node_Map'Class)
       return Qt4.Q_Integer
   is
   begin
      return QDomNamedNodeMap_size (Self.Object);
   end Size;

   ---------
   -- "=" --
   ---------

   overriding function "="
    (Self : Q_Dom_Named_Node_Map;
     N : Q_Dom_Named_Node_Map)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (eq_QDomNamedNodeMapCR (Self.Object, N.Object), 0);
   end "=";

   function initialize_QDomNotation
    (Storage : System.Address)
      return Internals.QDomNode_Access;
   pragma Import (C, initialize_QDomNotation, "__QtAda_inititialize_QDomNotation");

   function adjust_QDomNotation
    (Storage : System.Address;
     From    : Internals.QDomNode_Access)
       return Internals.QDomNode_Access;
   pragma Import (C, adjust_QDomNotation, "__QtAda_adjust_QDomNotation");

   procedure finalize_QDomNotation (Object : Internals.QDomNode_Access);
   pragma Import (C, finalize_QDomNotation, "__QtAda_finalize_QDomNotation");

   function QDomNotation_nodeType
    (Self : Internals.QDomNode_Access)
       return Dom_Node_Type;
   pragma Import (C, QDomNotation_nodeType, "__QtAda_QDomNotation_nodeType_Q");

   procedure QDomNotation_publicId
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNotation_publicId, "__QtAda_QDomNotation_publicId_Q");

   procedure QDomNotation_systemId
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNotation_systemId, "__QtAda_QDomNotation_systemId_Q");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_Dom_Notation) is
   begin
      Self.Object := adjust_QDomNotation (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_Dom_Notation) is
   begin
      if not Self.Wrapper then
         finalize_QDomNotation (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_Dom_Notation) is
      use type Internals.QDomNode_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QDomNotation (Self.Storage'Address);
      end if;
   end Initialize;

   ---------------
   -- Node_Type --
   ---------------

   function Node_Type
    (Self : Q_Dom_Notation'Class)
       return Dom_Node_Type
   is
   begin
      return QDomNotation_nodeType (Self.Object);
   end Node_Type;

   ---------------
   -- Public_Id --
   ---------------

   function Public_Id
    (Self : Q_Dom_Notation'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomNotation_publicId (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Public_Id;

   ---------------
   -- System_Id --
   ---------------

   function System_Id
    (Self : Q_Dom_Notation'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomNotation_systemId (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end System_Id;

   function initialize_QDomNodeList
    (Storage : System.Address)
      return Internals.QDomNodeList_Access;
   pragma Import (C, initialize_QDomNodeList, "__QtAda_inititialize_QDomNodeList");

   function adjust_QDomNodeList
    (Storage : System.Address;
     From    : Internals.QDomNodeList_Access)
       return Internals.QDomNodeList_Access;
   pragma Import (C, adjust_QDomNodeList, "__QtAda_adjust_QDomNodeList");

   procedure finalize_QDomNodeList (Object : Internals.QDomNodeList_Access);
   pragma Import (C, finalize_QDomNodeList, "__QtAda_finalize_QDomNodeList");

   procedure QDomNodeList_at_int
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNodeList_Access;
     Index : Qt4.Q_Integer);
   pragma Import (C, QDomNodeList_at_int, "__QtAda_QDomNodeList_at_int_Q");

   function QDomNodeList_count
    (Self : Internals.QDomNodeList_Access)
       return Qt4.Q_Integer;
   pragma Import (C, QDomNodeList_count, "__QtAda_QDomNodeList_count_Q");

   function QDomNodeList_isEmpty
    (Self : Internals.QDomNodeList_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNodeList_isEmpty, "__QtAda_QDomNodeList_isEmpty_Q");

   procedure QDomNodeList_item_int
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNodeList_Access;
     Index : Qt4.Q_Integer);
   pragma Import (C, QDomNodeList_item_int, "__QtAda_QDomNodeList_item_int_Q");

   function QDomNodeList_length
    (Self : Internals.QDomNodeList_Access)
       return Qt4.Q_Unsigned_Integer;
   pragma Import (C, QDomNodeList_length, "__QtAda_QDomNodeList_length_Q");

   function QDomNodeList_size
    (Self : Internals.QDomNodeList_Access)
       return Qt4.Q_Integer;
   pragma Import (C, QDomNodeList_size, "__QtAda_QDomNodeList_size_Q");

   function eq_QDomNodeListCR
    (Self : Internals.QDomNodeList_Access;
     N : Internals.QDomNodeList_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, eq_QDomNodeListCR, "__QtAda_QDomNodeList_eq_QDomNodeListCR_Q");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_Dom_Node_List) is
   begin
      Self.Object := adjust_QDomNodeList (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_Dom_Node_List) is
   begin
      if not Self.Wrapper then
         finalize_QDomNodeList (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_Dom_Node_List) is
      use type Internals.QDomNodeList_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QDomNodeList (Self.Storage'Address);
      end if;
   end Initialize;

   -------------
   -- Item_At --
   -------------

   function Item_At
    (Self : Q_Dom_Node_List'Class;
     Index : Qt4.Q_Integer)
       return Q_Dom_Node
   is
   begin
      return Returns : Q_Dom_Node do
         QDomNodeList_at_int (Returns.Object, Self.Object, Index);
      end return;
   end Item_At;

   -----------
   -- Count --
   -----------

   function Count
    (Self : Q_Dom_Node_List'Class)
       return Qt4.Q_Integer
   is
   begin
      return QDomNodeList_count (Self.Object);
   end Count;

   --------------
   -- Is_Empty --
   --------------

   function Is_Empty
    (Self : Q_Dom_Node_List'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNodeList_isEmpty (Self.Object), 0);
   end Is_Empty;

   ----------
   -- Item --
   ----------

   function Item
    (Self : Q_Dom_Node_List'Class;
     Index : Qt4.Q_Integer)
       return Q_Dom_Node
   is
   begin
      return Returns : Q_Dom_Node do
         QDomNodeList_item_int (Returns.Object, Self.Object, Index);
      end return;
   end Item;

   ------------
   -- Length --
   ------------

   function Length
    (Self : Q_Dom_Node_List'Class)
       return Qt4.Q_Unsigned_Integer
   is
   begin
      return QDomNodeList_length (Self.Object);
   end Length;

   ----------
   -- Size --
   ----------

   function Size
    (Self : Q_Dom_Node_List'Class)
       return Qt4.Q_Integer
   is
   begin
      return QDomNodeList_size (Self.Object);
   end Size;

   ---------
   -- "=" --
   ---------

   overriding function "="
    (Self : Q_Dom_Node_List;
     N : Q_Dom_Node_List)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (eq_QDomNodeListCR (Self.Object, N.Object), 0);
   end "=";

   function initialize_QDomProcessingInstruction
    (Storage : System.Address)
      return Internals.QDomNode_Access;
   pragma Import (C, initialize_QDomProcessingInstruction, "__QtAda_inititialize_QDomProcessingInstruction");

   function adjust_QDomProcessingInstruction
    (Storage : System.Address;
     From    : Internals.QDomNode_Access)
       return Internals.QDomNode_Access;
   pragma Import (C, adjust_QDomProcessingInstruction, "__QtAda_adjust_QDomProcessingInstruction");

   procedure finalize_QDomProcessingInstruction (Object : Internals.QDomNode_Access);
   pragma Import (C, finalize_QDomProcessingInstruction, "__QtAda_finalize_QDomProcessingInstruction");

   procedure QDomProcessingInstruction_data
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomProcessingInstruction_data, "__QtAda_QDomProcessingInstruction_data_Q");

   function QDomProcessingInstruction_nodeType
    (Self : Internals.QDomNode_Access)
       return Dom_Node_Type;
   pragma Import (C, QDomProcessingInstruction_nodeType, "__QtAda_QDomProcessingInstruction_nodeType_Q");

   procedure QDomProcessingInstruction_setData_QStringCR
    (Self : Internals.QDomNode_Access;
     D : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomProcessingInstruction_setData_QStringCR, "__QtAda_QDomProcessingInstruction_setData_QStringCR");

   procedure QDomProcessingInstruction_target
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomProcessingInstruction_target, "__QtAda_QDomProcessingInstruction_target_Q");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_Dom_Processing_Instruction) is
   begin
      Self.Object := adjust_QDomProcessingInstruction (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_Dom_Processing_Instruction) is
   begin
      if not Self.Wrapper then
         finalize_QDomProcessingInstruction (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_Dom_Processing_Instruction) is
      use type Internals.QDomNode_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QDomProcessingInstruction (Self.Storage'Address);
      end if;
   end Initialize;

   ----------
   -- Data --
   ----------

   function Data
    (Self : Q_Dom_Processing_Instruction'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomProcessingInstruction_data (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Data;

   ---------------
   -- Node_Type --
   ---------------

   function Node_Type
    (Self : Q_Dom_Processing_Instruction'Class)
       return Dom_Node_Type
   is
   begin
      return QDomProcessingInstruction_nodeType (Self.Object);
   end Node_Type;

   --------------
   -- Set_Data --
   --------------

   procedure Set_Data
    (Self : in out Q_Dom_Processing_Instruction'Class;
     D : Qt4.Strings.Q_String'Class)
   is
   begin
      QDomProcessingInstruction_setData_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (D));
   end Set_Data;

   ------------
   -- Target --
   ------------

   function Target
    (Self : Q_Dom_Processing_Instruction'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomProcessingInstruction_target (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Target;

   function initialize_QDomText
    (Storage : System.Address)
      return Internals.QDomNode_Access;
   pragma Import (C, initialize_QDomText, "__QtAda_inititialize_QDomText");

   function adjust_QDomText
    (Storage : System.Address;
     From    : Internals.QDomNode_Access)
       return Internals.QDomNode_Access;
   pragma Import (C, adjust_QDomText, "__QtAda_adjust_QDomText");

   procedure finalize_QDomText (Object : Internals.QDomNode_Access);
   pragma Import (C, finalize_QDomText, "__QtAda_finalize_QDomText");

   function QDomText_nodeType
    (Self : Internals.QDomNode_Access)
       return Dom_Node_Type;
   pragma Import (C, QDomText_nodeType, "__QtAda_QDomText_nodeType_Q");

   procedure QDomText_splitText_int
    (Self : Internals.QDomNode_Access;
     Offset : Qt4.Q_Integer);
   pragma Import (C, QDomText_splitText_int, "__QtAda_QDomText_splitText_int");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_Dom_Text) is
   begin
      Self.Object := adjust_QDomText (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_Dom_Text) is
   begin
      if not Self.Wrapper then
         finalize_QDomText (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_Dom_Text) is
      use type Internals.QDomNode_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QDomText (Self.Storage'Address);
      end if;
   end Initialize;

   ---------------
   -- Node_Type --
   ---------------

   function Node_Type
    (Self : Q_Dom_Text'Class)
       return Dom_Node_Type
   is
   begin
      return QDomText_nodeType (Self.Object);
   end Node_Type;

   ----------------
   -- Split_Text --
   ----------------

   procedure Split_Text
    (Self : in out Q_Dom_Text'Class;
     Offset : Qt4.Q_Integer)
   is
   begin
      QDomText_splitText_int (Self.Object, Offset);
   end Split_Text;

   function initialize_QDomNode
    (Storage : System.Address)
      return Internals.QDomNode_Access;
   pragma Import (C, initialize_QDomNode, "__QtAda_inititialize_QDomNode");

   function adjust_QDomNode
    (Storage : System.Address;
     From    : Internals.QDomNode_Access)
       return Internals.QDomNode_Access;
   pragma Import (C, adjust_QDomNode, "__QtAda_adjust_QDomNode");

   procedure finalize_QDomNode (Object : Internals.QDomNode_Access);
   pragma Import (C, finalize_QDomNode, "__QtAda_finalize_QDomNode");

   procedure QDomNode_appendChild_QDomNodeCR
    (Self : Internals.QDomNode_Access;
     New_Child : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_appendChild_QDomNodeCR, "__QtAda_QDomNode_appendChild_QDomNodeCR");

   procedure QDomNode_attributes
    (Returns : Internals.QDomNamedNodeMap_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_attributes, "__QtAda_QDomNode_attributes_Q");

   procedure QDomNode_childNodes
    (Returns : Internals.QDomNodeList_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_childNodes, "__QtAda_QDomNode_childNodes_Q");

   procedure QDomNode_clear
    (Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_clear, "__QtAda_QDomNode_clear");

   procedure QDomNode_cloneNode_bool
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access;
     Deep : Interfaces.C.unsigned);
   pragma Import (C, QDomNode_cloneNode_bool, "__QtAda_QDomNode_cloneNode_bool_Q");

   function QDomNode_columnNumber
    (Self : Internals.QDomNode_Access)
       return Qt4.Q_Integer;
   pragma Import (C, QDomNode_columnNumber, "__QtAda_QDomNode_columnNumber_Q");

   procedure QDomNode_firstChild
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_firstChild, "__QtAda_QDomNode_firstChild_Q");

   procedure QDomNode_firstChildElement_QStringCR
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access;
     Tag_Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomNode_firstChildElement_QStringCR, "__QtAda_QDomNode_firstChildElement_QStringCR_Q");

   function QDomNode_hasAttributes
    (Self : Internals.QDomNode_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNode_hasAttributes, "__QtAda_QDomNode_hasAttributes_Q");

   function QDomNode_hasChildNodes
    (Self : Internals.QDomNode_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNode_hasChildNodes, "__QtAda_QDomNode_hasChildNodes_Q");

   procedure QDomNode_insertAfter_QDomNodeCR_QDomNodeCR
    (Self : Internals.QDomNode_Access;
     New_Child : Internals.QDomNode_Access;
     Ref_Child : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_insertAfter_QDomNodeCR_QDomNodeCR, "__QtAda_QDomNode_insertAfter_QDomNodeCR_QDomNodeCR");

   procedure QDomNode_insertBefore_QDomNodeCR_QDomNodeCR
    (Self : Internals.QDomNode_Access;
     New_Child : Internals.QDomNode_Access;
     Ref_Child : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_insertBefore_QDomNodeCR_QDomNodeCR, "__QtAda_QDomNode_insertBefore_QDomNodeCR_QDomNodeCR");

   function QDomNode_isAttr
    (Self : Internals.QDomNode_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNode_isAttr, "__QtAda_QDomNode_isAttr_Q");

   function QDomNode_isCDATASection
    (Self : Internals.QDomNode_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNode_isCDATASection, "__QtAda_QDomNode_isCDATASection_Q");

   function QDomNode_isCharacterData
    (Self : Internals.QDomNode_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNode_isCharacterData, "__QtAda_QDomNode_isCharacterData_Q");

   function QDomNode_isComment
    (Self : Internals.QDomNode_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNode_isComment, "__QtAda_QDomNode_isComment_Q");

   function QDomNode_isDocument
    (Self : Internals.QDomNode_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNode_isDocument, "__QtAda_QDomNode_isDocument_Q");

   function QDomNode_isDocumentFragment
    (Self : Internals.QDomNode_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNode_isDocumentFragment, "__QtAda_QDomNode_isDocumentFragment_Q");

   function QDomNode_isDocumentType
    (Self : Internals.QDomNode_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNode_isDocumentType, "__QtAda_QDomNode_isDocumentType_Q");

   function QDomNode_isElement
    (Self : Internals.QDomNode_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNode_isElement, "__QtAda_QDomNode_isElement_Q");

   function QDomNode_isEntity
    (Self : Internals.QDomNode_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNode_isEntity, "__QtAda_QDomNode_isEntity_Q");

   function QDomNode_isEntityReference
    (Self : Internals.QDomNode_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNode_isEntityReference, "__QtAda_QDomNode_isEntityReference_Q");

   function QDomNode_isNotation
    (Self : Internals.QDomNode_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNode_isNotation, "__QtAda_QDomNode_isNotation_Q");

   function QDomNode_isNull
    (Self : Internals.QDomNode_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNode_isNull, "__QtAda_QDomNode_isNull_Q");

   function QDomNode_isProcessingInstruction
    (Self : Internals.QDomNode_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNode_isProcessingInstruction, "__QtAda_QDomNode_isProcessingInstruction_Q");

   function QDomNode_isSupported_QStringCR_QStringCR
    (Self : Internals.QDomNode_Access;
     Feature : Qt4.Strings.Internals.QString_Access;
     Version : Qt4.Strings.Internals.QString_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNode_isSupported_QStringCR_QStringCR, "__QtAda_QDomNode_isSupported_QStringCR_QStringCR_Q");

   function QDomNode_isText
    (Self : Internals.QDomNode_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QDomNode_isText, "__QtAda_QDomNode_isText_Q");

   procedure QDomNode_lastChild
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_lastChild, "__QtAda_QDomNode_lastChild_Q");

   procedure QDomNode_lastChildElement_QStringCR
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access;
     Tag_Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomNode_lastChildElement_QStringCR, "__QtAda_QDomNode_lastChildElement_QStringCR_Q");

   function QDomNode_lineNumber
    (Self : Internals.QDomNode_Access)
       return Qt4.Q_Integer;
   pragma Import (C, QDomNode_lineNumber, "__QtAda_QDomNode_lineNumber_Q");

   procedure QDomNode_localName
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_localName, "__QtAda_QDomNode_localName_Q");

   procedure QDomNode_namedItem_QStringCR
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access;
     Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomNode_namedItem_QStringCR, "__QtAda_QDomNode_namedItem_QStringCR_Q");

   procedure QDomNode_namespaceURI
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_namespaceURI, "__QtAda_QDomNode_namespaceURI_Q");

   procedure QDomNode_nextSibling
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_nextSibling, "__QtAda_QDomNode_nextSibling_Q");

   procedure QDomNode_nextSiblingElement_QStringCR
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access;
     Tag_Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomNode_nextSiblingElement_QStringCR, "__QtAda_QDomNode_nextSiblingElement_QStringCR_Q");

   procedure QDomNode_nodeName
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_nodeName, "__QtAda_QDomNode_nodeName_Q");

   function QDomNode_nodeType
    (Self : Internals.QDomNode_Access)
       return Dom_Node_Type;
   pragma Import (C, QDomNode_nodeType, "__QtAda_QDomNode_nodeType_Q");

   procedure QDomNode_nodeValue
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_nodeValue, "__QtAda_QDomNode_nodeValue_Q");

   procedure QDomNode_normalize
    (Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_normalize, "__QtAda_QDomNode_normalize");

   procedure QDomNode_ownerDocument
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_ownerDocument, "__QtAda_QDomNode_ownerDocument_Q");

   procedure QDomNode_parentNode
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_parentNode, "__QtAda_QDomNode_parentNode_Q");

   procedure QDomNode_prefix
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_prefix, "__QtAda_QDomNode_prefix_Q");

   procedure QDomNode_previousSibling
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_previousSibling, "__QtAda_QDomNode_previousSibling_Q");

   procedure QDomNode_previousSiblingElement_QStringCR
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access;
     Tag_Name : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomNode_previousSiblingElement_QStringCR, "__QtAda_QDomNode_previousSiblingElement_QStringCR_Q");

   procedure QDomNode_removeChild_QDomNodeCR
    (Self : Internals.QDomNode_Access;
     Old_Child : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_removeChild_QDomNodeCR, "__QtAda_QDomNode_removeChild_QDomNodeCR");

   procedure QDomNode_replaceChild_QDomNodeCR_QDomNodeCR
    (Self : Internals.QDomNode_Access;
     New_Child : Internals.QDomNode_Access;
     Old_Child : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_replaceChild_QDomNodeCR_QDomNodeCR, "__QtAda_QDomNode_replaceChild_QDomNodeCR_QDomNodeCR");

   procedure QDomNode_setNodeValue_QStringCR
    (Self : Internals.QDomNode_Access;
     V : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomNode_setNodeValue_QStringCR, "__QtAda_QDomNode_setNodeValue_QStringCR");

   procedure QDomNode_setPrefix_QStringCR
    (Self : Internals.QDomNode_Access;
     Pre : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QDomNode_setPrefix_QStringCR, "__QtAda_QDomNode_setPrefix_QStringCR");

   procedure QDomNode_toAttr
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_toAttr, "__QtAda_QDomNode_toAttr_Q");

   procedure QDomNode_toCDATASection
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_toCDATASection, "__QtAda_QDomNode_toCDATASection_Q");

   procedure QDomNode_toCharacterData
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_toCharacterData, "__QtAda_QDomNode_toCharacterData_Q");

   procedure QDomNode_toComment
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_toComment, "__QtAda_QDomNode_toComment_Q");

   procedure QDomNode_toDocument
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_toDocument, "__QtAda_QDomNode_toDocument_Q");

   procedure QDomNode_toDocumentFragment
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_toDocumentFragment, "__QtAda_QDomNode_toDocumentFragment_Q");

   procedure QDomNode_toDocumentType
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_toDocumentType, "__QtAda_QDomNode_toDocumentType_Q");

   procedure QDomNode_toElement
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_toElement, "__QtAda_QDomNode_toElement_Q");

   procedure QDomNode_toEntity
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_toEntity, "__QtAda_QDomNode_toEntity_Q");

   procedure QDomNode_toEntityReference
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_toEntityReference, "__QtAda_QDomNode_toEntityReference_Q");

   procedure QDomNode_toNotation
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_toNotation, "__QtAda_QDomNode_toNotation_Q");

   procedure QDomNode_toProcessingInstruction
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_toProcessingInstruction, "__QtAda_QDomNode_toProcessingInstruction_Q");

   procedure QDomNode_toText
    (Returns : Internals.QDomNode_Access;
     Self : Internals.QDomNode_Access);
   pragma Import (C, QDomNode_toText, "__QtAda_QDomNode_toText_Q");

   function eq_QDomNodeCR
    (Self : Internals.QDomNode_Access;
     N : Internals.QDomNode_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, eq_QDomNodeCR, "__QtAda_QDomNode_eq_QDomNodeCR_Q");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_Dom_Node) is
   begin
      Self.Object := adjust_QDomNode (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_Dom_Node) is
   begin
      if not Self.Wrapper then
         finalize_QDomNode (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_Dom_Node) is
      use type Internals.QDomNode_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QDomNode (Self.Storage'Address);
      end if;
   end Initialize;

   ------------------
   -- Append_Child --
   ------------------

   procedure Append_Child
    (Self : in out Q_Dom_Node'Class;
     New_Child : Q_Dom_Node'Class)
   is
   begin
      QDomNode_appendChild_QDomNodeCR (Self.Object, New_Child.Object);
   end Append_Child;

   ----------------
   -- Attributes --
   ----------------

   function Attributes
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Named_Node_Map
   is
   begin
      return Returns : Q_Dom_Named_Node_Map do
         QDomNode_attributes (Returns.Object, Self.Object);
      end return;
   end Attributes;

   -----------------
   -- Child_Nodes --
   -----------------

   function Child_Nodes
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Node_List
   is
   begin
      return Returns : Q_Dom_Node_List do
         QDomNode_childNodes (Returns.Object, Self.Object);
      end return;
   end Child_Nodes;

   -----------
   -- Clear --
   -----------

   procedure Clear
    (Self : in out Q_Dom_Node'Class)
   is
   begin
      QDomNode_clear (Self.Object);
   end Clear;

   ----------------
   -- Clone_Node --
   ----------------

   function Clone_Node
    (Self : Q_Dom_Node'Class;
     Deep : Boolean
       := True)
       return Q_Dom_Node
   is
   begin
      return Returns : Q_Dom_Node do
         QDomNode_cloneNode_bool (Returns.Object, Self.Object, Qt_Ada.Internals.Boolean_Conversions.To_unsigned (Deep));
      end return;
   end Clone_Node;

   -------------------
   -- Column_Number --
   -------------------

   function Column_Number
    (Self : Q_Dom_Node'Class)
       return Qt4.Q_Integer
   is
   begin
      return QDomNode_columnNumber (Self.Object);
   end Column_Number;

   -----------------
   -- First_Child --
   -----------------

   function First_Child
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Node
   is
   begin
      return Returns : Q_Dom_Node do
         QDomNode_firstChild (Returns.Object, Self.Object);
      end return;
   end First_Child;

   -------------------------
   -- First_Child_Element --
   -------------------------

   function First_Child_Element
    (Self : Q_Dom_Node'Class;
     Tag_Name : Qt4.Strings.Q_String'Class)
       return Q_Dom_Element
   is
   begin
      return Returns : Q_Dom_Element do
         QDomNode_firstChildElement_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Tag_Name));
      end return;
   end First_Child_Element;

   --------------------
   -- Has_Attributes --
   --------------------

   function Has_Attributes
    (Self : Q_Dom_Node'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNode_hasAttributes (Self.Object), 0);
   end Has_Attributes;

   ---------------------
   -- Has_Child_Nodes --
   ---------------------

   function Has_Child_Nodes
    (Self : Q_Dom_Node'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNode_hasChildNodes (Self.Object), 0);
   end Has_Child_Nodes;

   ------------------
   -- Insert_After --
   ------------------

   procedure Insert_After
    (Self : in out Q_Dom_Node'Class;
     New_Child : Q_Dom_Node'Class;
     Ref_Child : Q_Dom_Node'Class)
   is
   begin
      QDomNode_insertAfter_QDomNodeCR_QDomNodeCR (Self.Object, New_Child.Object, Ref_Child.Object);
   end Insert_After;

   -------------------
   -- Insert_Before --
   -------------------

   procedure Insert_Before
    (Self : in out Q_Dom_Node'Class;
     New_Child : Q_Dom_Node'Class;
     Ref_Child : Q_Dom_Node'Class)
   is
   begin
      QDomNode_insertBefore_QDomNodeCR_QDomNodeCR (Self.Object, New_Child.Object, Ref_Child.Object);
   end Insert_Before;

   -------------
   -- Is_Attr --
   -------------

   function Is_Attr
    (Self : Q_Dom_Node'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNode_isAttr (Self.Object), 0);
   end Is_Attr;

   ----------------------
   -- Is_CDATA_Section --
   ----------------------

   function Is_CDATA_Section
    (Self : Q_Dom_Node'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNode_isCDATASection (Self.Object), 0);
   end Is_CDATA_Section;

   -----------------------
   -- Is_Character_Data --
   -----------------------

   function Is_Character_Data
    (Self : Q_Dom_Node'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNode_isCharacterData (Self.Object), 0);
   end Is_Character_Data;

   ----------------
   -- Is_Comment --
   ----------------

   function Is_Comment
    (Self : Q_Dom_Node'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNode_isComment (Self.Object), 0);
   end Is_Comment;

   -----------------
   -- Is_Document --
   -----------------

   function Is_Document
    (Self : Q_Dom_Node'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNode_isDocument (Self.Object), 0);
   end Is_Document;

   --------------------------
   -- Is_Document_Fragment --
   --------------------------

   function Is_Document_Fragment
    (Self : Q_Dom_Node'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNode_isDocumentFragment (Self.Object), 0);
   end Is_Document_Fragment;

   ----------------------
   -- Is_Document_Type --
   ----------------------

   function Is_Document_Type
    (Self : Q_Dom_Node'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNode_isDocumentType (Self.Object), 0);
   end Is_Document_Type;

   ----------------
   -- Is_Element --
   ----------------

   function Is_Element
    (Self : Q_Dom_Node'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNode_isElement (Self.Object), 0);
   end Is_Element;

   ---------------
   -- Is_Entity --
   ---------------

   function Is_Entity
    (Self : Q_Dom_Node'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNode_isEntity (Self.Object), 0);
   end Is_Entity;

   -------------------------
   -- Is_Entity_Reference --
   -------------------------

   function Is_Entity_Reference
    (Self : Q_Dom_Node'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNode_isEntityReference (Self.Object), 0);
   end Is_Entity_Reference;

   -----------------
   -- Is_Notation --
   -----------------

   function Is_Notation
    (Self : Q_Dom_Node'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNode_isNotation (Self.Object), 0);
   end Is_Notation;

   -------------
   -- Is_Null --
   -------------

   function Is_Null
    (Self : Q_Dom_Node'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNode_isNull (Self.Object), 0);
   end Is_Null;

   -------------------------------
   -- Is_Processing_Instruction --
   -------------------------------

   function Is_Processing_Instruction
    (Self : Q_Dom_Node'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNode_isProcessingInstruction (Self.Object), 0);
   end Is_Processing_Instruction;

   ------------------
   -- Is_Supported --
   ------------------

   function Is_Supported
    (Self : Q_Dom_Node'Class;
     Feature : Qt4.Strings.Q_String'Class;
     Version : Qt4.Strings.Q_String'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNode_isSupported_QStringCR_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Feature), Qt4.Strings.Internals.QString_View (Version)), 0);
   end Is_Supported;

   -------------
   -- Is_Text --
   -------------

   function Is_Text
    (Self : Q_Dom_Node'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QDomNode_isText (Self.Object), 0);
   end Is_Text;

   ----------------
   -- Last_Child --
   ----------------

   function Last_Child
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Node
   is
   begin
      return Returns : Q_Dom_Node do
         QDomNode_lastChild (Returns.Object, Self.Object);
      end return;
   end Last_Child;

   ------------------------
   -- Last_Child_Element --
   ------------------------

   function Last_Child_Element
    (Self : Q_Dom_Node'Class;
     Tag_Name : Qt4.Strings.Q_String'Class)
       return Q_Dom_Element
   is
   begin
      return Returns : Q_Dom_Element do
         QDomNode_lastChildElement_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Tag_Name));
      end return;
   end Last_Child_Element;

   -----------------
   -- Line_Number --
   -----------------

   function Line_Number
    (Self : Q_Dom_Node'Class)
       return Qt4.Q_Integer
   is
   begin
      return QDomNode_lineNumber (Self.Object);
   end Line_Number;

   ----------------
   -- Local_Name --
   ----------------

   function Local_Name
    (Self : Q_Dom_Node'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomNode_localName (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Local_Name;

   ----------------
   -- Named_Item --
   ----------------

   function Named_Item
    (Self : Q_Dom_Node'Class;
     Name : Qt4.Strings.Q_String'Class)
       return Q_Dom_Node
   is
   begin
      return Returns : Q_Dom_Node do
         QDomNode_namedItem_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Name));
      end return;
   end Named_Item;

   -------------------
   -- Namespace_URI --
   -------------------

   function Namespace_URI
    (Self : Q_Dom_Node'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomNode_namespaceURI (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Namespace_URI;

   ------------------
   -- Next_Sibling --
   ------------------

   function Next_Sibling
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Node
   is
   begin
      return Returns : Q_Dom_Node do
         QDomNode_nextSibling (Returns.Object, Self.Object);
      end return;
   end Next_Sibling;

   --------------------------
   -- Next_Sibling_Element --
   --------------------------

   function Next_Sibling_Element
    (Self : Q_Dom_Node'Class;
     Tag_Name : Qt4.Strings.Q_String'Class)
       return Q_Dom_Element
   is
   begin
      return Returns : Q_Dom_Element do
         QDomNode_nextSiblingElement_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Tag_Name));
      end return;
   end Next_Sibling_Element;

   ---------------
   -- Node_Name --
   ---------------

   function Node_Name
    (Self : Q_Dom_Node'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomNode_nodeName (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Node_Name;

   ---------------
   -- Node_Type --
   ---------------

   function Node_Type
    (Self : Q_Dom_Node'Class)
       return Dom_Node_Type
   is
   begin
      return QDomNode_nodeType (Self.Object);
   end Node_Type;

   ----------------
   -- Node_Value --
   ----------------

   function Node_Value
    (Self : Q_Dom_Node'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomNode_nodeValue (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Node_Value;

   ---------------
   -- Normalize --
   ---------------

   procedure Normalize
    (Self : in out Q_Dom_Node'Class)
   is
   begin
      QDomNode_normalize (Self.Object);
   end Normalize;

   --------------------
   -- Owner_Document --
   --------------------

   function Owner_Document
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Document
   is
   begin
      return Returns : Q_Dom_Document do
         QDomNode_ownerDocument (Returns.Object, Self.Object);
      end return;
   end Owner_Document;

   -----------------
   -- Parent_Node --
   -----------------

   function Parent_Node
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Node
   is
   begin
      return Returns : Q_Dom_Node do
         QDomNode_parentNode (Returns.Object, Self.Object);
      end return;
   end Parent_Node;

   ------------
   -- Prefix --
   ------------

   function Prefix
    (Self : Q_Dom_Node'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QDomNode_prefix (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Prefix;

   ----------------------
   -- Previous_Sibling --
   ----------------------

   function Previous_Sibling
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Node
   is
   begin
      return Returns : Q_Dom_Node do
         QDomNode_previousSibling (Returns.Object, Self.Object);
      end return;
   end Previous_Sibling;

   ------------------------------
   -- Previous_Sibling_Element --
   ------------------------------

   function Previous_Sibling_Element
    (Self : Q_Dom_Node'Class;
     Tag_Name : Qt4.Strings.Q_String'Class)
       return Q_Dom_Element
   is
   begin
      return Returns : Q_Dom_Element do
         QDomNode_previousSiblingElement_QStringCR (Returns.Object, Self.Object, Qt4.Strings.Internals.QString_View (Tag_Name));
      end return;
   end Previous_Sibling_Element;

   ------------------
   -- Remove_Child --
   ------------------

   procedure Remove_Child
    (Self : in out Q_Dom_Node'Class;
     Old_Child : Q_Dom_Node'Class)
   is
   begin
      QDomNode_removeChild_QDomNodeCR (Self.Object, Old_Child.Object);
   end Remove_Child;

   -------------------
   -- Replace_Child --
   -------------------

   procedure Replace_Child
    (Self : in out Q_Dom_Node'Class;
     New_Child : Q_Dom_Node'Class;
     Old_Child : Q_Dom_Node'Class)
   is
   begin
      QDomNode_replaceChild_QDomNodeCR_QDomNodeCR (Self.Object, New_Child.Object, Old_Child.Object);
   end Replace_Child;

   --------------------
   -- Set_Node_Value --
   --------------------

   procedure Set_Node_Value
    (Self : in out Q_Dom_Node'Class;
     V : Qt4.Strings.Q_String'Class)
   is
   begin
      QDomNode_setNodeValue_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (V));
   end Set_Node_Value;

   ----------------
   -- Set_Prefix --
   ----------------

   procedure Set_Prefix
    (Self : in out Q_Dom_Node'Class;
     Pre : Qt4.Strings.Q_String'Class)
   is
   begin
      QDomNode_setPrefix_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (Pre));
   end Set_Prefix;

   -------------
   -- To_Attr --
   -------------

   function To_Attr
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Attr
   is
   begin
      return Returns : Q_Dom_Attr do
         QDomNode_toAttr (Returns.Object, Self.Object);
      end return;
   end To_Attr;

   ----------------------
   -- To_CDATA_Section --
   ----------------------

   function To_CDATA_Section
    (Self : Q_Dom_Node'Class)
       return Q_Dom_CDATA_Section
   is
   begin
      return Returns : Q_Dom_CDATA_Section do
         QDomNode_toCDATASection (Returns.Object, Self.Object);
      end return;
   end To_CDATA_Section;

   -----------------------
   -- To_Character_Data --
   -----------------------

   function To_Character_Data
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Character_Data
   is
   begin
      return Returns : Q_Dom_Character_Data do
         QDomNode_toCharacterData (Returns.Object, Self.Object);
      end return;
   end To_Character_Data;

   ----------------
   -- To_Comment --
   ----------------

   function To_Comment
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Comment
   is
   begin
      return Returns : Q_Dom_Comment do
         QDomNode_toComment (Returns.Object, Self.Object);
      end return;
   end To_Comment;

   -----------------
   -- To_Document --
   -----------------

   function To_Document
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Document
   is
   begin
      return Returns : Q_Dom_Document do
         QDomNode_toDocument (Returns.Object, Self.Object);
      end return;
   end To_Document;

   --------------------------
   -- To_Document_Fragment --
   --------------------------

   function To_Document_Fragment
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Document_Fragment
   is
   begin
      return Returns : Q_Dom_Document_Fragment do
         QDomNode_toDocumentFragment (Returns.Object, Self.Object);
      end return;
   end To_Document_Fragment;

   ----------------------
   -- To_Document_Type --
   ----------------------

   function To_Document_Type
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Document_Type
   is
   begin
      return Returns : Q_Dom_Document_Type do
         QDomNode_toDocumentType (Returns.Object, Self.Object);
      end return;
   end To_Document_Type;

   ----------------
   -- To_Element --
   ----------------

   function To_Element
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Element
   is
   begin
      return Returns : Q_Dom_Element do
         QDomNode_toElement (Returns.Object, Self.Object);
      end return;
   end To_Element;

   ---------------
   -- To_Entity --
   ---------------

   function To_Entity
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Entity
   is
   begin
      return Returns : Q_Dom_Entity do
         QDomNode_toEntity (Returns.Object, Self.Object);
      end return;
   end To_Entity;

   -------------------------
   -- To_Entity_Reference --
   -------------------------

   function To_Entity_Reference
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Entity_Reference
   is
   begin
      return Returns : Q_Dom_Entity_Reference do
         QDomNode_toEntityReference (Returns.Object, Self.Object);
      end return;
   end To_Entity_Reference;

   -----------------
   -- To_Notation --
   -----------------

   function To_Notation
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Notation
   is
   begin
      return Returns : Q_Dom_Notation do
         QDomNode_toNotation (Returns.Object, Self.Object);
      end return;
   end To_Notation;

   -------------------------------
   -- To_Processing_Instruction --
   -------------------------------

   function To_Processing_Instruction
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Processing_Instruction
   is
   begin
      return Returns : Q_Dom_Processing_Instruction do
         QDomNode_toProcessingInstruction (Returns.Object, Self.Object);
      end return;
   end To_Processing_Instruction;

   -------------
   -- To_Text --
   -------------

   function To_Text
    (Self : Q_Dom_Node'Class)
       return Q_Dom_Text
   is
   begin
      return Returns : Q_Dom_Text do
         QDomNode_toText (Returns.Object, Self.Object);
      end return;
   end To_Text;

   ---------
   -- "=" --
   ---------

   overriding function "="
    (Self : Q_Dom_Node;
     N : Q_Dom_Node)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (eq_QDomNodeCR (Self.Object, N.Object), 0);
   end "=";

   ---------------
   -- Internals --
   ---------------

   package body Internals is

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QDomNode_Access)
          return Q_Dom_Attr
      is
      begin
         return Q_Dom_Attr'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QDomNode_Access)
          return Q_Dom_CDATA_Section
      is
      begin
         return Q_Dom_CDATA_Section'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QDomNode_Access)
          return Q_Dom_Character_Data
      is
      begin
         return Q_Dom_Character_Data'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QDomNode_Access)
          return Q_Dom_Comment
      is
      begin
         return Q_Dom_Comment'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QDomNode_Access)
          return Q_Dom_Document
      is
      begin
         return Q_Dom_Document'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QDomNode_Access)
          return Q_Dom_Document_Fragment
      is
      begin
         return Q_Dom_Document_Fragment'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QDomNode_Access)
          return Q_Dom_Document_Type
      is
      begin
         return Q_Dom_Document_Type'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QDomNode_Access)
          return Q_Dom_Element
      is
      begin
         return Q_Dom_Element'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QDomNode_Access)
          return Q_Dom_Entity
      is
      begin
         return Q_Dom_Entity'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QDomNode_Access)
          return Q_Dom_Entity_Reference
      is
      begin
         return Q_Dom_Entity_Reference'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   -----------------------------
   -- QDomImplementation_View --
   -----------------------------

      function QDomImplementation_View
       (Item : Q_Dom_Implementation'Class)
          return QDomImplementation_Access
      is
      begin
         return Item.Object;
      end QDomImplementation_View;

      package QDomImplementation_Conversions is
        new System.Address_To_Access_Conversions
             (QDomImplementation);

   ----------------------------------
   -- QDomImplementationTo_Pointer --
   ----------------------------------

      function To_Pointer
       (Address : System.Address)
          return QDomImplementation_Access
      is
      begin
         return
           QDomImplementation_Access
            (QDomImplementation_Conversions.To_Pointer
            (Address));
      end To_Pointer;

   ----------------------------------
   -- QDomImplementationTo_Address --
   ----------------------------------

      function To_Address
       (Pointer : QDomImplementation_Access)
          return System.Address
      is
      begin
         return
           QDomImplementation_Conversions.To_Address
            (QDomImplementation_Conversions.Object_Pointer
              (Pointer));
      end To_Address;

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QDomImplementation_Access)
          return Q_Dom_Implementation
      is
      begin
         return Q_Dom_Implementation'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   ---------------------------
   -- QDomNamedNodeMap_View --
   ---------------------------

      function QDomNamedNodeMap_View
       (Item : Q_Dom_Named_Node_Map'Class)
          return QDomNamedNodeMap_Access
      is
      begin
         return Item.Object;
      end QDomNamedNodeMap_View;

      package QDomNamedNodeMap_Conversions is
        new System.Address_To_Access_Conversions
             (QDomNamedNodeMap);

   --------------------------------
   -- QDomNamedNodeMapTo_Pointer --
   --------------------------------

      function To_Pointer
       (Address : System.Address)
          return QDomNamedNodeMap_Access
      is
      begin
         return
           QDomNamedNodeMap_Access
            (QDomNamedNodeMap_Conversions.To_Pointer
            (Address));
      end To_Pointer;

   --------------------------------
   -- QDomNamedNodeMapTo_Address --
   --------------------------------

      function To_Address
       (Pointer : QDomNamedNodeMap_Access)
          return System.Address
      is
      begin
         return
           QDomNamedNodeMap_Conversions.To_Address
            (QDomNamedNodeMap_Conversions.Object_Pointer
              (Pointer));
      end To_Address;

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QDomNamedNodeMap_Access)
          return Q_Dom_Named_Node_Map
      is
      begin
         return Q_Dom_Named_Node_Map'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QDomNode_Access)
          return Q_Dom_Notation
      is
      begin
         return Q_Dom_Notation'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   -----------------------
   -- QDomNodeList_View --
   -----------------------

      function QDomNodeList_View
       (Item : Q_Dom_Node_List'Class)
          return QDomNodeList_Access
      is
      begin
         return Item.Object;
      end QDomNodeList_View;

      package QDomNodeList_Conversions is
        new System.Address_To_Access_Conversions
             (QDomNodeList);

   ----------------------------
   -- QDomNodeListTo_Pointer --
   ----------------------------

      function To_Pointer
       (Address : System.Address)
          return QDomNodeList_Access
      is
      begin
         return
           QDomNodeList_Access
            (QDomNodeList_Conversions.To_Pointer
            (Address));
      end To_Pointer;

   ----------------------------
   -- QDomNodeListTo_Address --
   ----------------------------

      function To_Address
       (Pointer : QDomNodeList_Access)
          return System.Address
      is
      begin
         return
           QDomNodeList_Conversions.To_Address
            (QDomNodeList_Conversions.Object_Pointer
              (Pointer));
      end To_Address;

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QDomNodeList_Access)
          return Q_Dom_Node_List
      is
      begin
         return Q_Dom_Node_List'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QDomNode_Access)
          return Q_Dom_Processing_Instruction
      is
      begin
         return Q_Dom_Processing_Instruction'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QDomNode_Access)
          return Q_Dom_Text
      is
      begin
         return Q_Dom_Text'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   -------------------
   -- QDomNode_View --
   -------------------

      function QDomNode_View
       (Item : Q_Dom_Node'Class)
          return QDomNode_Access
      is
      begin
         return Item.Object;
      end QDomNode_View;

      package QDomNode_Conversions is
        new System.Address_To_Access_Conversions
             (QDomNode);

   ------------------------
   -- QDomNodeTo_Pointer --
   ------------------------

      function To_Pointer
       (Address : System.Address)
          return QDomNode_Access
      is
      begin
         return
           QDomNode_Access
            (QDomNode_Conversions.To_Pointer
            (Address));
      end To_Pointer;

   ------------------------
   -- QDomNodeTo_Address --
   ------------------------

      function To_Address
       (Pointer : QDomNode_Access)
          return System.Address
      is
      begin
         return
           QDomNode_Conversions.To_Address
            (QDomNode_Conversions.Object_Pointer
              (Pointer));
      end To_Address;

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QDomNode_Access)
          return Q_Dom_Node
      is
      begin
         return Q_Dom_Node'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   end Internals;

end Qt4.Dom_Nodes;
