在使用XML DATA BINDING生成XML接口单元的时候出了问题。(100分)

  • 主题发起人 主题发起人 zulu
  • 开始时间 开始时间
Z

zulu

Unregistered / Unconfirmed
GUEST, unregistred user!
生成出来的接口名称都是对的,但是类名称怎么都是TXML啊,有四个TXML类,类名相同,郁闷。
生成的单元文件如下:有点奇怪

{*******************************************************************************************}
{ }
{ XML Data Binding }
{ }
{ Generated on: 2006-12-6 14:32:37 }
{ Generated from: E:/PsWorkZone/Users/zgj/Received/LJ/北京评标接口/Test格式文件.xsd }
{ Settings stored in: E:/PsWorkZone/Users/zgj/Received/LJ/北京评标接口/Test格式文件.xdb }
{ }
{*******************************************************************************************}

unit Test;

interface

uses xmldom, XMLDoc, XMLIntf;

type

{ Forward Decls }

IQDJJWNDY = interface;
IGCMSDY = interface;
IJBXXDY = interface;
IGCZBXXDY = interface;

{ IQDJJWNDY }

IQDJJWNDY = interface(IXMLNode)
['{1ADFA0DB-376C-47FC-AA9F-C2FBA96BD89A}']
{ Property Accessors }
function Get_GCMS: IQDJJWNDY;
{ Methods & Properties }
property GCMS: IQDJJWNDY read Get_GCMS;
end;

{ IGCMSDY }

IGCMSDY = interface(IXMLNode)
['{2DC51B0D-FC10-483A-ACB2-046ADE110ACC}']
{ Property Accessors }
function Get_JBXX: IGCMSDY;
function Get_GCZBXX: IGCMSDY;
{ Methods & Properties }
property JBXX: IGCMSDY read Get_JBXX;
property GCZBXX: IGCMSDY read Get_GCZBXX;
end;

{ IJBXXDY }

IJBXXDY = interface(IXMLNode)
['{83ED0286-C032-4C4B-A577-2930A104628B}']
end;

{ IGCZBXXDY }

IGCZBXXDY = interface(IXMLNode)
['{AFB89D86-96A6-4FEB-9AAD-8FD96609A252}']
end;

{ Forward Decls }

TXML = class;
TXML = class;
TXML = class;
TXML = class;

{ TXML }

TXML = class(TXMLNode, IQDJJWNDY)
protected
{ IQDJJWNDY }
function Get_GCMS: IQDJJWNDY;
public
procedure AfterConstruction; override;
end;

{ TXML }

TXML = class(TXMLNode, IGCMSDY)
protected
{ IGCMSDY }
function Get_JBXX: IGCMSDY;
function Get_GCZBXX: IGCMSDY;
public
procedure AfterConstruction; override;
end;

{ TXML }

TXML = class(TXMLNode, IJBXXDY)
protected
{ IJBXXDY }
end;

{ TXML }

TXML = class(TXMLNode, IGCZBXXDY)
protected
{ IGCZBXXDY }
end;

implementation

{ TXML }

procedure TXML.AfterConstruction;
begin
RegisterChildNode('书籍描述', TXML);
inherited;
end;

function TXML.Get_GCMS: IQDJJWNDY;
begin
Result := ChildNodes['书籍描述'] as IQDJJWNDY;
end;

{ TXML }

procedure TXML.AfterConstruction;
begin
RegisterChildNode('基本信息', TXML);
RegisterChildNode('招标信息', TXML);
inherited;
end;

function TXML.Get_JBXX: IGCMSDY;
begin
Result := ChildNodes['基本信息'] as IGCMSDY;
end;

function TXML.Get_GCZBXX: IGCMSDY;
begin
Result := ChildNodes['招标信息'] as IGCMSDY;
end;

{ TXML }

{ TXML }

end.
 
后退
顶部