
{*********************************************************************************************************************}
{                                                                                                                     }
{                                                  XML Data Binding                                                   }
{                                                                                                                     }
{         Generated on: 2008-07-15 20:21:59                                                                           }
{       Generated from: D:\AAA\NOWA KSIAZKA\D2007 I BAZY DANYCH\11 XML i DOM\SAMPLES\DEL\XMLBasic02\EXE\Rodzina.xml   }
{   Settings stored in: D:\AAA\NOWA KSIAZKA\D2007 I BAZY DANYCH\11 XML i DOM\SAMPLES\DEL\XMLBasic02\EXE\Rodzina.xdb   }
{                                                                                                                     }
{*********************************************************************************************************************}

unit Rodzina;

interface

uses xmldom, XMLDoc, XMLIntf;

type

{ Forward Decls }

  IXMLRodzinaType = interface;
  IXMLOjciecType = interface;
  IXMLMatkaType = interface;
  IXMLSynType = interface;

{ IXMLRodzinaType }

  IXMLRodzinaType = interface(IXMLNode)
    ['{005683F7-6B71-4FC0-B810-442507EFFDB2}']
    { Property Accessors }
    function Get_Ojciec: IXMLOjciecType;
    function Get_Matka: IXMLMatkaType;
    function Get_Syn: IXMLSynType;
    { Methods & Properties }
    property Ojciec: IXMLOjciecType read Get_Ojciec;
    property Matka: IXMLMatkaType read Get_Matka;
    property Syn: IXMLSynType read Get_Syn;
  end;

{ IXMLOjciecType }

  IXMLOjciecType = interface(IXMLNode)
    ['{D0BEC75B-4A30-4DBB-BF9B-DA03C07A4A4A}']
    { Property Accessors }
    function Get_Pali: WideString;
    function Get_Pracuje: WideString;
    function Get_Uczy_sie: WideString;
    function Get_Posiada_prawo_jazdy: WideString;
    function Get_Imie: WideString;
    procedure Set_Pali(Value: WideString);
    procedure Set_Pracuje(Value: WideString);
    procedure Set_Uczy_sie(Value: WideString);
    procedure Set_Posiada_prawo_jazdy(Value: WideString);
    procedure Set_Imie(Value: WideString);
    { Methods & Properties }
    property Pali: WideString read Get_Pali write Set_Pali;
    property Pracuje: WideString read Get_Pracuje write Set_Pracuje;
    property Uczy_sie: WideString read Get_Uczy_sie write Set_Uczy_sie;
    property Posiada_prawo_jazdy: WideString read Get_Posiada_prawo_jazdy write Set_Posiada_prawo_jazdy;
    property Imie: WideString read Get_Imie write Set_Imie;
  end;

{ IXMLMatkaType }

  IXMLMatkaType = interface(IXMLNode)
    ['{EAA00C92-E1CD-4C6B-901F-C9DCF7413981}']
    { Property Accessors }
    function Get_Pali: WideString;
    function Get_Pracuje: WideString;
    function Get_Uczy_sie: WideString;
    function Get_Posiada_prawo_jazdy: WideString;
    function Get_Imie: WideString;
    procedure Set_Pali(Value: WideString);
    procedure Set_Pracuje(Value: WideString);
    procedure Set_Uczy_sie(Value: WideString);
    procedure Set_Posiada_prawo_jazdy(Value: WideString);
    procedure Set_Imie(Value: WideString);
    { Methods & Properties }
    property Pali: WideString read Get_Pali write Set_Pali;
    property Pracuje: WideString read Get_Pracuje write Set_Pracuje;
    property Uczy_sie: WideString read Get_Uczy_sie write Set_Uczy_sie;
    property Posiada_prawo_jazdy: WideString read Get_Posiada_prawo_jazdy write Set_Posiada_prawo_jazdy;
    property Imie: WideString read Get_Imie write Set_Imie;
  end;

{ IXMLSynType }

  IXMLSynType = interface(IXMLNode)
    ['{73F79E3D-3FF6-405A-969C-D15F4DA99B77}']
    { Property Accessors }
    function Get_Pali: WideString;
    function Get_Pracuje: WideString;
    function Get_Uczy_sie: WideString;
    function Get_Posiada_prawo_jazdy: WideString;
    function Get_Imie: WideString;
    procedure Set_Pali(Value: WideString);
    procedure Set_Pracuje(Value: WideString);
    procedure Set_Uczy_sie(Value: WideString);
    procedure Set_Posiada_prawo_jazdy(Value: WideString);
    procedure Set_Imie(Value: WideString);
    { Methods & Properties }
    property Pali: WideString read Get_Pali write Set_Pali;
    property Pracuje: WideString read Get_Pracuje write Set_Pracuje;
    property Uczy_sie: WideString read Get_Uczy_sie write Set_Uczy_sie;
    property Posiada_prawo_jazdy: WideString read Get_Posiada_prawo_jazdy write Set_Posiada_prawo_jazdy;
    property Imie: WideString read Get_Imie write Set_Imie;
  end;

{ Forward Decls }

  TXMLRodzinaType = class;
  TXMLOjciecType = class;
  TXMLMatkaType = class;
  TXMLSynType = class;

{ TXMLRodzinaType }

  TXMLRodzinaType = class(TXMLNode, IXMLRodzinaType)
  protected
    { IXMLRodzinaType }
    function Get_Ojciec: IXMLOjciecType;
    function Get_Matka: IXMLMatkaType;
    function Get_Syn: IXMLSynType;
  public
    procedure AfterConstruction; override;
  end;

{ TXMLOjciecType }

  TXMLOjciecType = class(TXMLNode, IXMLOjciecType)
  protected
    { IXMLOjciecType }
    function Get_Pali: WideString;
    function Get_Pracuje: WideString;
    function Get_Uczy_sie: WideString;
    function Get_Posiada_prawo_jazdy: WideString;
    function Get_Imie: WideString;
    procedure Set_Pali(Value: WideString);
    procedure Set_Pracuje(Value: WideString);
    procedure Set_Uczy_sie(Value: WideString);
    procedure Set_Posiada_prawo_jazdy(Value: WideString);
    procedure Set_Imie(Value: WideString);
  end;

{ TXMLMatkaType }

  TXMLMatkaType = class(TXMLNode, IXMLMatkaType)
  protected
    { IXMLMatkaType }
    function Get_Pali: WideString;
    function Get_Pracuje: WideString;
    function Get_Uczy_sie: WideString;
    function Get_Posiada_prawo_jazdy: WideString;
    function Get_Imie: WideString;
    procedure Set_Pali(Value: WideString);
    procedure Set_Pracuje(Value: WideString);
    procedure Set_Uczy_sie(Value: WideString);
    procedure Set_Posiada_prawo_jazdy(Value: WideString);
    procedure Set_Imie(Value: WideString);
  end;

{ TXMLSynType }

  TXMLSynType = class(TXMLNode, IXMLSynType)
  protected
    { IXMLSynType }
    function Get_Pali: WideString;
    function Get_Pracuje: WideString;
    function Get_Uczy_sie: WideString;
    function Get_Posiada_prawo_jazdy: WideString;
    function Get_Imie: WideString;
    procedure Set_Pali(Value: WideString);
    procedure Set_Pracuje(Value: WideString);
    procedure Set_Uczy_sie(Value: WideString);
    procedure Set_Posiada_prawo_jazdy(Value: WideString);
    procedure Set_Imie(Value: WideString);
  end;

{ Global Functions }

function Getrodzina(Doc: IXMLDocument): IXMLRodzinaType;
function Loadrodzina(const FileName: WideString): IXMLRodzinaType;
function Newrodzina: IXMLRodzinaType;

const
  TargetNamespace = '';

implementation

{ Global Functions }

function Getrodzina(Doc: IXMLDocument): IXMLRodzinaType;
begin
  Result := Doc.GetDocBinding('rodzina', TXMLRodzinaType, TargetNamespace) as IXMLRodzinaType;
end;

function Loadrodzina(const FileName: WideString): IXMLRodzinaType;
begin
  Result := LoadXMLDocument(FileName).GetDocBinding('rodzina', TXMLRodzinaType, TargetNamespace) as IXMLRodzinaType;
end;

function Newrodzina: IXMLRodzinaType;
begin
  Result := NewXMLDocument.GetDocBinding('rodzina', TXMLRodzinaType, TargetNamespace) as IXMLRodzinaType;
end;

{ TXMLRodzinaType }

procedure TXMLRodzinaType.AfterConstruction;
begin
  RegisterChildNode('ojciec', TXMLOjciecType);
  RegisterChildNode('matka', TXMLMatkaType);
  RegisterChildNode('syn', TXMLSynType);
  inherited;
end;

function TXMLRodzinaType.Get_Ojciec: IXMLOjciecType;
begin
  Result := ChildNodes['ojciec'] as IXMLOjciecType;
end;

function TXMLRodzinaType.Get_Matka: IXMLMatkaType;
begin
  Result := ChildNodes['matka'] as IXMLMatkaType;
end;

function TXMLRodzinaType.Get_Syn: IXMLSynType;
begin
  Result := ChildNodes['syn'] as IXMLSynType;
end;

{ TXMLOjciecType }

function TXMLOjciecType.Get_Pali: WideString;
begin
  Result := AttributeNodes['pali'].Text;
end;

procedure TXMLOjciecType.Set_Pali(Value: WideString);
begin
  SetAttribute('pali', Value);
end;

function TXMLOjciecType.Get_Pracuje: WideString;
begin
  Result := AttributeNodes['pracuje'].Text;
end;

procedure TXMLOjciecType.Set_Pracuje(Value: WideString);
begin
  SetAttribute('pracuje', Value);
end;

function TXMLOjciecType.Get_Uczy_sie: WideString;
begin
  Result := AttributeNodes['uczy_sie'].Text;
end;

procedure TXMLOjciecType.Set_Uczy_sie(Value: WideString);
begin
  SetAttribute('uczy_sie', Value);
end;

function TXMLOjciecType.Get_Posiada_prawo_jazdy: WideString;
begin
  Result := AttributeNodes['posiada_prawo_jazdy'].Text;
end;

procedure TXMLOjciecType.Set_Posiada_prawo_jazdy(Value: WideString);
begin
  SetAttribute('posiada_prawo_jazdy', Value);
end;

function TXMLOjciecType.Get_Imie: WideString;
begin
  Result := ChildNodes['imie'].Text;
end;

procedure TXMLOjciecType.Set_Imie(Value: WideString);
begin
  ChildNodes['imie'].NodeValue := Value;
end;

{ TXMLMatkaType }

function TXMLMatkaType.Get_Pali: WideString;
begin
  Result := AttributeNodes['pali'].Text;
end;

procedure TXMLMatkaType.Set_Pali(Value: WideString);
begin
  SetAttribute('pali', Value);
end;

function TXMLMatkaType.Get_Pracuje: WideString;
begin
  Result := AttributeNodes['pracuje'].Text;
end;

procedure TXMLMatkaType.Set_Pracuje(Value: WideString);
begin
  SetAttribute('pracuje', Value);
end;

function TXMLMatkaType.Get_Uczy_sie: WideString;
begin
  Result := AttributeNodes['uczy_sie'].Text;
end;

procedure TXMLMatkaType.Set_Uczy_sie(Value: WideString);
begin
  SetAttribute('uczy_sie', Value);
end;

function TXMLMatkaType.Get_Posiada_prawo_jazdy: WideString;
begin
  Result := AttributeNodes['posiada_prawo_jazdy'].Text;
end;

procedure TXMLMatkaType.Set_Posiada_prawo_jazdy(Value: WideString);
begin
  SetAttribute('posiada_prawo_jazdy', Value);
end;

function TXMLMatkaType.Get_Imie: WideString;
begin
  Result := ChildNodes['imie'].Text;
end;

procedure TXMLMatkaType.Set_Imie(Value: WideString);
begin
  ChildNodes['imie'].NodeValue := Value;
end;

{ TXMLSynType }

function TXMLSynType.Get_Pali: WideString;
begin
  Result := AttributeNodes['pali'].Text;
end;

procedure TXMLSynType.Set_Pali(Value: WideString);
begin
  SetAttribute('pali', Value);
end;

function TXMLSynType.Get_Pracuje: WideString;
begin
  Result := AttributeNodes['pracuje'].Text;
end;

procedure TXMLSynType.Set_Pracuje(Value: WideString);
begin
  SetAttribute('pracuje', Value);
end;

function TXMLSynType.Get_Uczy_sie: WideString;
begin
  Result := AttributeNodes['uczy_sie'].Text;
end;

procedure TXMLSynType.Set_Uczy_sie(Value: WideString);
begin
  SetAttribute('uczy_sie', Value);
end;

function TXMLSynType.Get_Posiada_prawo_jazdy: WideString;
begin
  Result := AttributeNodes['posiada_prawo_jazdy'].Text;
end;

procedure TXMLSynType.Set_Posiada_prawo_jazdy(Value: WideString);
begin
  SetAttribute('posiada_prawo_jazdy', Value);
end;

function TXMLSynType.Get_Imie: WideString;
begin
  Result := ChildNodes['imie'].Text;
end;

procedure TXMLSynType.Set_Imie(Value: WideString);
begin
  ChildNodes['imie'].NodeValue := Value;
end;

end.