package body MSHTML.IHTMLDOMNode_Object is

   function Get_nodeType
     (This : IHTMLDOMNode_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLDOMNode_Get_nodeType);
   end Get_nodeType;

   function Get_parentNode
     (This : IHTMLDOMNode_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLDOMNode_Get_parentNode);
   end Get_parentNode;

   function hasChildNodes
     (This : IHTMLDOMNode_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Invoke (This, IHTMLDOMNode_hasChildNodes);
   end hasChildNodes;

   function Get_childNodes
     (This : IHTMLDOMNode_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLDOMNode_Get_childNodes);
   end Get_childNodes;

   function Get_attributes
     (This : IHTMLDOMNode_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLDOMNode_Get_attributes);
   end Get_attributes;

   function insertBefore
     (This     : IHTMLDOMNode_Type;
      newChild : GNATCOM.Types.VARIANT;
      refChild : GNATCOM.Types.VARIANT
        := GNATCOM.Types.VARIANT_MISSING;
      Free     : Boolean := True)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Invoke
        (This,
         IHTMLDOMNode_insertBefore,
         GNATCOM.Dispinterface.Parameter_Array'
         (1 => refChild,
          2 => newChild),
         Free);
   end insertBefore;

   function removeChild
     (This     : IHTMLDOMNode_Type;
      oldChild : GNATCOM.Types.VARIANT;
      Free     : Boolean := True)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Invoke
        (This,
         IHTMLDOMNode_removeChild,
         GNATCOM.Dispinterface.Parameter_Array'
         (1 => oldChild),
         Free);
   end removeChild;

   function replaceChild
     (This     : IHTMLDOMNode_Type;
      newChild : GNATCOM.Types.VARIANT;
      oldChild : GNATCOM.Types.VARIANT;
      Free     : Boolean := True)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Invoke
        (This,
         IHTMLDOMNode_replaceChild,
         GNATCOM.Dispinterface.Parameter_Array'
         (1 => oldChild,
          2 => newChild),
         Free);
   end replaceChild;

   function cloneNode
     (This  : IHTMLDOMNode_Type;
      fDeep : GNATCOM.Types.VARIANT;
      Free  : Boolean := True)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Invoke
        (This,
         IHTMLDOMNode_cloneNode,
         GNATCOM.Dispinterface.Parameter_Array'
         (1 => fDeep),
         Free);
   end cloneNode;

   function removeNode
     (This  : IHTMLDOMNode_Type;
      fDeep : GNATCOM.Types.VARIANT
        := GNATCOM.Types.VARIANT_MISSING;
      Free  : Boolean := True)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Invoke
        (This,
         IHTMLDOMNode_removeNode,
         GNATCOM.Dispinterface.Parameter_Array'
         (1 => fDeep),
         Free);
   end removeNode;

   function swapNode
     (This      : IHTMLDOMNode_Type;
      otherNode : GNATCOM.Types.VARIANT;
      Free      : Boolean := True)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Invoke
        (This,
         IHTMLDOMNode_swapNode,
         GNATCOM.Dispinterface.Parameter_Array'
         (1 => otherNode),
         Free);
   end swapNode;

   function replaceNode
     (This        : IHTMLDOMNode_Type;
      replacement : GNATCOM.Types.VARIANT;
      Free        : Boolean := True)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Invoke
        (This,
         IHTMLDOMNode_replaceNode,
         GNATCOM.Dispinterface.Parameter_Array'
         (1 => replacement),
         Free);
   end replaceNode;

   function appendChild
     (This     : IHTMLDOMNode_Type;
      newChild : GNATCOM.Types.VARIANT;
      Free     : Boolean := True)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Invoke
        (This,
         IHTMLDOMNode_appendChild,
         GNATCOM.Dispinterface.Parameter_Array'
         (1 => newChild),
         Free);
   end appendChild;

   function Get_nodeName
     (This : IHTMLDOMNode_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLDOMNode_Get_nodeName);
   end Get_nodeName;

   procedure Put_nodeValue
     (This : IHTMLDOMNode_Type;
      P1   : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      Put
        (This,
         IHTMLDOMNode_Put_nodeValue,
         GNATCOM.Dispinterface.Parameter_Array'
         (1 => P1),
         Free);
   end Put_nodeValue;

   function Get_nodeValue
     (This : IHTMLDOMNode_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLDOMNode_Get_nodeValue);
   end Get_nodeValue;

   function Get_firstChild
     (This : IHTMLDOMNode_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLDOMNode_Get_firstChild);
   end Get_firstChild;

   function Get_lastChild
     (This : IHTMLDOMNode_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLDOMNode_Get_lastChild);
   end Get_lastChild;

   function Get_previousSibling
     (This : IHTMLDOMNode_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLDOMNode_Get_previousSibling);
   end Get_previousSibling;

   function Get_nextSibling
     (This : IHTMLDOMNode_Type)
     return GNATCOM.Types.VARIANT
   is
   begin
      return Get (This, IHTMLDOMNode_Get_nextSibling);
   end Get_nextSibling;

end MSHTML.IHTMLDOMNode_Object;

