Estimados, buenas tardes a todos !. a ver si alguien puede echarme una mano.
He creado una plantilla de un documento XML para después poder importarlo a un proyecto con el objetivo de crear los objetos y poder leerlo desde una aplicación cliente de un WebServices.
La estructura es sencilla:
Código Delphi
[-]
1
"SERV1"
"SERVICIO1"
2
"SERV2"
"SERVICIO2"
una vez que creo el documento uso la opción de delphi "XML DantaBinding" y lo que me está sucediendo es que los valores de
alias y
service_name me los toma como una colección o array de tipo de datos
Integer al crear la interface.
Código Delphi
[-]
IXMLServiceListType = interface(IXMLNode)
['{E1B6D7EE-7CE9-41A7-8CEE-6EC032EC845C}']
function Get_Id_service: IXMLIntegerList;
function Get_Alias: IXMLIntegerList;
function Get_Name_service: IXMLIntegerList;
property Id_service: IXMLIntegerList read Get_Id_service;
property Alias: IXMLIntegerList read Get_Alias;
property Name_service: IXMLIntegerList read Get_Name_service;
end;
IXMLIntegerList = interface(IXMLNodeCollection)
['{D12E15F7-DC94-4604-84FB-C50DD255BDA1}']
function Add(const Value: Integer): IXMLNode;
function Insert(const Index: Integer; const Value: Integer): IXMLNode;
function Get_Item(Index: Integer): Integer;
property Items[Index: Integer]: Integer read Get_Item; default;
end;
TXMLServiceListType = class;
TXMLIntegerList = class;
TXMLServiceListType = class(TXMLNode, IXMLServiceListType)
private
FId_service: IXMLIntegerList;
FAlias: IXMLIntegerList;
FName_service: IXMLIntegerList;
protected
function Get_Id_service: IXMLIntegerList;
function Get_Alias: IXMLIntegerList;
function Get_Name_service: IXMLIntegerList;
public
procedure AfterConstruction; override;
end;
TXMLIntegerList = class(TXMLNodeCollection, IXMLIntegerList)
protected
function Add(const Value: Integer): IXMLNode;
function Insert(const Index: Integer; const Value: Integer): IXMLNode;
function Get_Item(Index: Integer): Integer;
end;
Da igual si en el xml tengo las comillas o no, siempre me toma los tres campos como enteros. alguna idea ?. Gracias.