2008-04-22 13:36:55 +00:00
|
|
|
{
|
2008-04-24 14:37:05 +00:00
|
|
|
X2Software XML Data Binding
|
|
|
|
|
2009-09-29 15:12:47 +00:00
|
|
|
Generated on: 29-9-2009 14:31:13
|
2008-04-22 13:36:55 +00:00
|
|
|
Generated from: P:\test\XMLDataBinding\XSD\DataBindingHints.xsd
|
|
|
|
}
|
|
|
|
unit DataBindingHintsXML;
|
|
|
|
|
|
|
|
interface
|
|
|
|
uses
|
|
|
|
Classes,
|
|
|
|
XMLDoc,
|
|
|
|
XMLIntf;
|
|
|
|
|
|
|
|
type
|
|
|
|
{ Forward declarations for DataBindingHints }
|
|
|
|
IXMLDataBindingHints = interface;
|
|
|
|
IXMLEnumerations = interface;
|
|
|
|
IXMLEnumeration = interface;
|
|
|
|
IXMLMember = interface;
|
2008-04-25 10:34:16 +00:00
|
|
|
IXMLDocumentElements = interface;
|
|
|
|
IXMLDocumentElement = interface;
|
2008-05-14 13:30:54 +00:00
|
|
|
IXMLInterfaces = interface;
|
|
|
|
IXMLInterfaceName = interface;
|
2009-09-29 15:12:47 +00:00
|
|
|
IXMLProperties = interface;
|
|
|
|
IXMLPropertyName = interface;
|
2008-04-22 13:36:55 +00:00
|
|
|
|
|
|
|
{ Interfaces for DataBindingHints }
|
|
|
|
{
|
|
|
|
Contains hints and mappings for the data binding output
|
|
|
|
}
|
|
|
|
IXMLDataBindingHints = interface(IXMLNode)
|
2009-09-29 15:12:47 +00:00
|
|
|
['{434CBC09-8E33-4970-9C4A-535B4C898185}']
|
2008-04-22 13:36:55 +00:00
|
|
|
function GetHasEnumerations: Boolean;
|
|
|
|
function GetEnumerations: IXMLEnumerations;
|
2008-04-25 10:34:16 +00:00
|
|
|
function GetHasDocumentElements: Boolean;
|
|
|
|
function GetDocumentElements: IXMLDocumentElements;
|
2008-05-14 13:30:54 +00:00
|
|
|
function GetHasInterfaces: Boolean;
|
|
|
|
function GetInterfaces: IXMLInterfaces;
|
2009-09-29 15:12:47 +00:00
|
|
|
function GetHasProperties: Boolean;
|
|
|
|
function GetProperties: IXMLProperties;
|
2008-04-22 13:36:55 +00:00
|
|
|
|
|
|
|
property HasEnumerations: Boolean read GetHasEnumerations;
|
|
|
|
property Enumerations: IXMLEnumerations read GetEnumerations;
|
2008-04-25 10:34:16 +00:00
|
|
|
property HasDocumentElements: Boolean read GetHasDocumentElements;
|
|
|
|
property DocumentElements: IXMLDocumentElements read GetDocumentElements;
|
2008-05-14 13:30:54 +00:00
|
|
|
property HasInterfaces: Boolean read GetHasInterfaces;
|
|
|
|
property Interfaces: IXMLInterfaces read GetInterfaces;
|
2009-09-29 15:12:47 +00:00
|
|
|
property HasProperties: Boolean read GetHasProperties;
|
|
|
|
property Properties: IXMLProperties read GetProperties;
|
2008-04-22 13:36:55 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
IXMLEnumerations = interface(IXMLNodeCollection)
|
2009-09-29 15:12:47 +00:00
|
|
|
['{115ECCB0-407B-476E-AA99-63F584F883F7}']
|
2008-04-22 13:36:55 +00:00
|
|
|
function Get_Enumeration(Index: Integer): IXMLEnumeration;
|
|
|
|
function Add: IXMLEnumeration;
|
|
|
|
function Insert(Index: Integer): IXMLEnumeration;
|
|
|
|
|
|
|
|
property Enumeration[Index: Integer]: IXMLEnumeration read Get_Enumeration; default;
|
|
|
|
end;
|
|
|
|
|
|
|
|
IXMLEnumeration = interface(IXMLNodeCollection)
|
2009-09-29 15:12:47 +00:00
|
|
|
['{4B776A26-325C-4589-8F5B-88E2EE86DEC6}']
|
2008-04-22 13:36:55 +00:00
|
|
|
function Get_Member(Index: Integer): IXMLMember;
|
|
|
|
function Add: IXMLMember;
|
|
|
|
function Insert(Index: Integer): IXMLMember;
|
|
|
|
|
|
|
|
property Member[Index: Integer]: IXMLMember read Get_Member; default;
|
|
|
|
|
2008-05-14 13:30:54 +00:00
|
|
|
function GetSchema: WideString;
|
|
|
|
function GetXPath: WideString;
|
2008-04-22 13:36:55 +00:00
|
|
|
|
2008-05-14 13:30:54 +00:00
|
|
|
procedure SetSchema(const Value: WideString);
|
|
|
|
procedure SetXPath(const Value: WideString);
|
2008-04-22 13:36:55 +00:00
|
|
|
|
2008-05-14 13:30:54 +00:00
|
|
|
property Schema: WideString read GetSchema write SetSchema;
|
|
|
|
property XPath: WideString read GetXPath write SetXPath;
|
2008-04-22 13:36:55 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
IXMLMember = interface(IXMLNode)
|
2009-09-29 15:12:47 +00:00
|
|
|
['{2575F0F6-EDCA-4CC6-B532-94833BCFAB64}']
|
2008-04-25 10:34:16 +00:00
|
|
|
function GetName: WideString;
|
|
|
|
|
|
|
|
procedure SetName(const Value: WideString);
|
|
|
|
|
|
|
|
property Name: WideString read GetName write SetName;
|
|
|
|
end;
|
|
|
|
|
|
|
|
{
|
|
|
|
If present, only elements which are included in this list will be marked as
|
|
|
|
a Document Element.
|
|
|
|
}
|
|
|
|
IXMLDocumentElements = interface(IXMLNodeCollection)
|
2009-09-29 15:12:47 +00:00
|
|
|
['{8D3A5543-68FF-4101-9874-639A39E33950}']
|
2008-04-25 10:34:16 +00:00
|
|
|
function Get_DocumentElement(Index: Integer): IXMLDocumentElement;
|
|
|
|
function Add: IXMLDocumentElement;
|
|
|
|
function Insert(Index: Integer): IXMLDocumentElement;
|
|
|
|
|
|
|
|
property DocumentElement[Index: Integer]: IXMLDocumentElement read Get_DocumentElement; default;
|
|
|
|
end;
|
|
|
|
|
|
|
|
IXMLDocumentElement = interface(IXMLNode)
|
2009-09-29 15:12:47 +00:00
|
|
|
['{3DFD0655-26DA-4237-ACEC-BB7CB3354DD2}']
|
2008-05-14 13:30:54 +00:00
|
|
|
function GetSchema: WideString;
|
|
|
|
function GetXPath: WideString;
|
2008-04-22 13:36:55 +00:00
|
|
|
|
2008-05-14 13:30:54 +00:00
|
|
|
procedure SetSchema(const Value: WideString);
|
|
|
|
procedure SetXPath(const Value: WideString);
|
2008-04-22 13:36:55 +00:00
|
|
|
|
2008-05-14 13:30:54 +00:00
|
|
|
property Schema: WideString read GetSchema write SetSchema;
|
|
|
|
property XPath: WideString read GetXPath write SetXPath;
|
|
|
|
end;
|
|
|
|
|
|
|
|
IXMLInterfaces = interface(IXMLNodeCollection)
|
2009-09-29 15:12:47 +00:00
|
|
|
['{E70E67E3-C108-4015-B996-962D800BE555}']
|
2008-05-14 13:30:54 +00:00
|
|
|
function Get_InterfaceName(Index: Integer): IXMLInterfaceName;
|
|
|
|
function Add: IXMLInterfaceName;
|
|
|
|
function Insert(Index: Integer): IXMLInterfaceName;
|
|
|
|
|
|
|
|
property InterfaceName[Index: Integer]: IXMLInterfaceName read Get_InterfaceName; default;
|
|
|
|
end;
|
|
|
|
|
|
|
|
IXMLInterfaceName = interface(IXMLNode)
|
2009-09-29 15:12:47 +00:00
|
|
|
['{2B8126E7-2F89-4E5D-89E3-4F5F7AEE35E9}']
|
|
|
|
function GetSchema: WideString;
|
|
|
|
function GetXPath: WideString;
|
|
|
|
|
|
|
|
procedure SetSchema(const Value: WideString);
|
|
|
|
procedure SetXPath(const Value: WideString);
|
|
|
|
|
|
|
|
property Schema: WideString read GetSchema write SetSchema;
|
|
|
|
property XPath: WideString read GetXPath write SetXPath;
|
|
|
|
end;
|
|
|
|
|
|
|
|
IXMLProperties = interface(IXMLNodeCollection)
|
|
|
|
['{88260AE1-1C40-4F0F-AA44-C61EDAA53B38}']
|
|
|
|
function Get_PropertyName(Index: Integer): IXMLPropertyName;
|
|
|
|
function Add: IXMLPropertyName;
|
|
|
|
function Insert(Index: Integer): IXMLPropertyName;
|
|
|
|
|
|
|
|
property PropertyName[Index: Integer]: IXMLPropertyName read Get_PropertyName; default;
|
|
|
|
end;
|
|
|
|
|
|
|
|
IXMLPropertyName = interface(IXMLNode)
|
|
|
|
['{DB714E5D-E62B-44C4-B7D4-0623887BCDF6}']
|
2008-05-14 13:30:54 +00:00
|
|
|
function GetSchema: WideString;
|
|
|
|
function GetXPath: WideString;
|
|
|
|
|
|
|
|
procedure SetSchema(const Value: WideString);
|
|
|
|
procedure SetXPath(const Value: WideString);
|
|
|
|
|
|
|
|
property Schema: WideString read GetSchema write SetSchema;
|
|
|
|
property XPath: WideString read GetXPath write SetXPath;
|
2008-04-22 13:36:55 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
{ Classes for DataBindingHints }
|
|
|
|
TXMLDataBindingHints = class(TXMLNode, IXMLDataBindingHints)
|
|
|
|
public
|
|
|
|
procedure AfterConstruction; override;
|
|
|
|
protected
|
|
|
|
function GetHasEnumerations: Boolean;
|
|
|
|
function GetEnumerations: IXMLEnumerations;
|
2008-04-25 10:34:16 +00:00
|
|
|
function GetHasDocumentElements: Boolean;
|
|
|
|
function GetDocumentElements: IXMLDocumentElements;
|
2008-05-14 13:30:54 +00:00
|
|
|
function GetHasInterfaces: Boolean;
|
|
|
|
function GetInterfaces: IXMLInterfaces;
|
2009-09-29 15:12:47 +00:00
|
|
|
function GetHasProperties: Boolean;
|
|
|
|
function GetProperties: IXMLProperties;
|
2008-04-22 13:36:55 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
TXMLEnumerations = class(TXMLNodeCollection, IXMLEnumerations)
|
|
|
|
public
|
|
|
|
procedure AfterConstruction; override;
|
|
|
|
protected
|
|
|
|
function Get_Enumeration(Index: Integer): IXMLEnumeration;
|
|
|
|
function Add: IXMLEnumeration;
|
|
|
|
function Insert(Index: Integer): IXMLEnumeration;
|
|
|
|
end;
|
|
|
|
|
|
|
|
TXMLEnumeration = class(TXMLNodeCollection, IXMLEnumeration)
|
|
|
|
public
|
|
|
|
procedure AfterConstruction; override;
|
|
|
|
protected
|
|
|
|
function Get_Member(Index: Integer): IXMLMember;
|
|
|
|
function Add: IXMLMember;
|
|
|
|
function Insert(Index: Integer): IXMLMember;
|
|
|
|
|
2008-05-14 13:30:54 +00:00
|
|
|
function GetSchema: WideString;
|
|
|
|
function GetXPath: WideString;
|
2008-04-22 13:36:55 +00:00
|
|
|
|
2008-05-14 13:30:54 +00:00
|
|
|
procedure SetSchema(const Value: WideString);
|
|
|
|
procedure SetXPath(const Value: WideString);
|
2008-04-22 13:36:55 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
TXMLMember = class(TXMLNode, IXMLMember)
|
|
|
|
protected
|
|
|
|
function GetName: WideString;
|
|
|
|
|
|
|
|
procedure SetName(const Value: WideString);
|
|
|
|
end;
|
|
|
|
|
2008-04-25 10:34:16 +00:00
|
|
|
TXMLDocumentElements = class(TXMLNodeCollection, IXMLDocumentElements)
|
|
|
|
public
|
|
|
|
procedure AfterConstruction; override;
|
|
|
|
protected
|
|
|
|
function Get_DocumentElement(Index: Integer): IXMLDocumentElement;
|
|
|
|
function Add: IXMLDocumentElement;
|
|
|
|
function Insert(Index: Integer): IXMLDocumentElement;
|
|
|
|
end;
|
|
|
|
|
|
|
|
TXMLDocumentElement = class(TXMLNode, IXMLDocumentElement)
|
|
|
|
protected
|
2008-05-14 13:30:54 +00:00
|
|
|
function GetSchema: WideString;
|
|
|
|
function GetXPath: WideString;
|
2008-04-25 10:34:16 +00:00
|
|
|
|
2008-05-14 13:30:54 +00:00
|
|
|
procedure SetSchema(const Value: WideString);
|
|
|
|
procedure SetXPath(const Value: WideString);
|
|
|
|
end;
|
|
|
|
|
|
|
|
TXMLInterfaces = class(TXMLNodeCollection, IXMLInterfaces)
|
|
|
|
public
|
|
|
|
procedure AfterConstruction; override;
|
|
|
|
protected
|
|
|
|
function Get_InterfaceName(Index: Integer): IXMLInterfaceName;
|
|
|
|
function Add: IXMLInterfaceName;
|
|
|
|
function Insert(Index: Integer): IXMLInterfaceName;
|
|
|
|
end;
|
|
|
|
|
|
|
|
TXMLInterfaceName = class(TXMLNode, IXMLInterfaceName)
|
|
|
|
protected
|
2009-09-29 15:12:47 +00:00
|
|
|
function GetSchema: WideString;
|
|
|
|
function GetXPath: WideString;
|
|
|
|
|
|
|
|
procedure SetSchema(const Value: WideString);
|
|
|
|
procedure SetXPath(const Value: WideString);
|
|
|
|
end;
|
|
|
|
|
|
|
|
TXMLProperties = class(TXMLNodeCollection, IXMLProperties)
|
|
|
|
public
|
|
|
|
procedure AfterConstruction; override;
|
|
|
|
protected
|
|
|
|
function Get_PropertyName(Index: Integer): IXMLPropertyName;
|
|
|
|
function Add: IXMLPropertyName;
|
|
|
|
function Insert(Index: Integer): IXMLPropertyName;
|
|
|
|
end;
|
|
|
|
|
|
|
|
TXMLPropertyName = class(TXMLNode, IXMLPropertyName)
|
|
|
|
protected
|
2008-05-14 13:30:54 +00:00
|
|
|
function GetSchema: WideString;
|
|
|
|
function GetXPath: WideString;
|
|
|
|
|
|
|
|
procedure SetSchema(const Value: WideString);
|
|
|
|
procedure SetXPath(const Value: WideString);
|
2008-04-25 10:34:16 +00:00
|
|
|
end;
|
|
|
|
|
2008-04-22 13:36:55 +00:00
|
|
|
|
|
|
|
{ Document functions }
|
2009-09-29 15:12:47 +00:00
|
|
|
function GetDataBindingHints(ADocument: XMLIntf.IXMLDocument): IXMLDataBindingHints;
|
2008-04-22 13:36:55 +00:00
|
|
|
function LoadDataBindingHints(const AFileName: String): IXMLDataBindingHints;
|
|
|
|
function LoadDataBindingHintsFromStream(AStream: TStream): IXMLDataBindingHints;
|
|
|
|
function NewDataBindingHints: IXMLDataBindingHints;
|
|
|
|
|
|
|
|
|
|
|
|
const
|
2008-04-24 14:37:05 +00:00
|
|
|
TargetNamespace = 'http://www.x2software.net/xsd/databinding/DataBindingHints.xsd';
|
2008-04-22 13:36:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
uses
|
|
|
|
SysUtils;
|
|
|
|
|
|
|
|
{ Document functions }
|
2009-09-29 15:12:47 +00:00
|
|
|
function GetDataBindingHints(ADocument: XMLIntf.IXMLDocument): IXMLDataBindingHints;
|
2008-04-22 13:36:55 +00:00
|
|
|
begin
|
|
|
|
Result := ADocument.GetDocBinding('DataBindingHints', TXMLDataBindingHints, TargetNamespace) as IXMLDataBindingHints
|
|
|
|
end;
|
|
|
|
|
|
|
|
function LoadDataBindingHints(const AFileName: String): IXMLDataBindingHints;
|
|
|
|
begin
|
|
|
|
Result := LoadXMLDocument(AFileName).GetDocBinding('DataBindingHints', TXMLDataBindingHints, TargetNamespace) as IXMLDataBindingHints
|
|
|
|
end;
|
|
|
|
|
|
|
|
function LoadDataBindingHintsFromStream(AStream: TStream): IXMLDataBindingHints;
|
|
|
|
var
|
2009-09-29 15:12:47 +00:00
|
|
|
doc: XMLIntf.IXMLDocument;
|
2008-04-22 13:36:55 +00:00
|
|
|
|
|
|
|
begin
|
|
|
|
doc := NewXMLDocument;
|
|
|
|
doc.LoadFromStream(AStream);
|
|
|
|
Result := GetDataBindingHints(doc);
|
|
|
|
end;
|
|
|
|
|
|
|
|
function NewDataBindingHints: IXMLDataBindingHints;
|
|
|
|
begin
|
|
|
|
Result := NewXMLDocument.GetDocBinding('DataBindingHints', TXMLDataBindingHints, TargetNamespace) as IXMLDataBindingHints
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ Implementation for DataBindingHints }
|
|
|
|
procedure TXMLDataBindingHints.AfterConstruction;
|
|
|
|
begin
|
|
|
|
RegisterChildNode('Enumerations', TXMLEnumerations);
|
2008-04-25 10:34:16 +00:00
|
|
|
RegisterChildNode('DocumentElements', TXMLDocumentElements);
|
2008-05-14 13:30:54 +00:00
|
|
|
RegisterChildNode('Interfaces', TXMLInterfaces);
|
2009-09-29 15:12:47 +00:00
|
|
|
RegisterChildNode('Properties', TXMLProperties);
|
2008-04-22 13:36:55 +00:00
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLDataBindingHints.GetHasEnumerations: Boolean;
|
|
|
|
begin
|
|
|
|
Result := Assigned(ChildNodes.FindNode('Enumerations'));
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
function TXMLDataBindingHints.GetEnumerations: IXMLEnumerations;
|
|
|
|
begin
|
|
|
|
Result := (ChildNodes['Enumerations'] as IXMLEnumerations);
|
|
|
|
end;
|
|
|
|
|
2008-04-25 10:34:16 +00:00
|
|
|
function TXMLDataBindingHints.GetHasDocumentElements: Boolean;
|
|
|
|
begin
|
|
|
|
Result := Assigned(ChildNodes.FindNode('DocumentElements'));
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
function TXMLDataBindingHints.GetDocumentElements: IXMLDocumentElements;
|
|
|
|
begin
|
|
|
|
Result := (ChildNodes['DocumentElements'] as IXMLDocumentElements);
|
|
|
|
end;
|
|
|
|
|
2008-05-14 13:30:54 +00:00
|
|
|
function TXMLDataBindingHints.GetHasInterfaces: Boolean;
|
|
|
|
begin
|
|
|
|
Result := Assigned(ChildNodes.FindNode('Interfaces'));
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
function TXMLDataBindingHints.GetInterfaces: IXMLInterfaces;
|
|
|
|
begin
|
|
|
|
Result := (ChildNodes['Interfaces'] as IXMLInterfaces);
|
|
|
|
end;
|
|
|
|
|
2009-09-29 15:12:47 +00:00
|
|
|
function TXMLDataBindingHints.GetHasProperties: Boolean;
|
|
|
|
begin
|
|
|
|
Result := Assigned(ChildNodes.FindNode('Properties'));
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
function TXMLDataBindingHints.GetProperties: IXMLProperties;
|
|
|
|
begin
|
|
|
|
Result := (ChildNodes['Properties'] as IXMLProperties);
|
|
|
|
end;
|
|
|
|
|
2008-04-22 13:36:55 +00:00
|
|
|
procedure TXMLEnumerations.AfterConstruction;
|
|
|
|
begin
|
|
|
|
RegisterChildNode('Enumeration', TXMLEnumeration);
|
|
|
|
|
|
|
|
ItemTag := 'Enumeration';
|
|
|
|
ItemInterface := IXMLEnumeration;
|
|
|
|
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLEnumerations.Get_Enumeration(Index: Integer): IXMLEnumeration;
|
|
|
|
begin
|
|
|
|
Result := (List[Index] as IXMLEnumeration);
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLEnumerations.Add: IXMLEnumeration;
|
|
|
|
begin
|
|
|
|
Result := (AddItem(-1) as IXMLEnumeration);
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLEnumerations.Insert(Index: Integer): IXMLEnumeration;
|
|
|
|
begin
|
|
|
|
Result := (AddItem(Index) as IXMLEnumeration);
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TXMLEnumeration.AfterConstruction;
|
|
|
|
begin
|
|
|
|
RegisterChildNode('Member', TXMLMember);
|
|
|
|
|
|
|
|
ItemTag := 'Member';
|
|
|
|
ItemInterface := IXMLMember;
|
|
|
|
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLEnumeration.Get_Member(Index: Integer): IXMLMember;
|
|
|
|
begin
|
|
|
|
Result := (List[Index] as IXMLMember);
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLEnumeration.Add: IXMLMember;
|
|
|
|
begin
|
|
|
|
Result := (AddItem(-1) as IXMLMember);
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLEnumeration.Insert(Index: Integer): IXMLMember;
|
|
|
|
begin
|
|
|
|
Result := (AddItem(Index) as IXMLMember);
|
|
|
|
end;
|
|
|
|
|
2008-05-14 13:30:54 +00:00
|
|
|
function TXMLEnumeration.GetSchema: WideString;
|
2008-04-22 13:36:55 +00:00
|
|
|
begin
|
2008-05-14 13:30:54 +00:00
|
|
|
Result := AttributeNodes['Schema'].Text;
|
2008-04-22 13:36:55 +00:00
|
|
|
end;
|
|
|
|
|
2008-05-14 13:30:54 +00:00
|
|
|
function TXMLEnumeration.GetXPath: WideString;
|
2008-04-22 13:36:55 +00:00
|
|
|
begin
|
2008-05-14 13:30:54 +00:00
|
|
|
Result := AttributeNodes['XPath'].Text;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TXMLEnumeration.SetSchema(const Value: WideString);
|
|
|
|
begin
|
|
|
|
SetAttribute('Schema', Value);
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TXMLEnumeration.SetXPath(const Value: WideString);
|
|
|
|
begin
|
|
|
|
SetAttribute('XPath', Value);
|
2008-04-22 13:36:55 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLMember.GetName: WideString;
|
|
|
|
begin
|
|
|
|
Result := AttributeNodes['Name'].Text;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TXMLMember.SetName(const Value: WideString);
|
|
|
|
begin
|
|
|
|
SetAttribute('Name', Value);
|
|
|
|
end;
|
|
|
|
|
2008-04-25 10:34:16 +00:00
|
|
|
procedure TXMLDocumentElements.AfterConstruction;
|
|
|
|
begin
|
|
|
|
RegisterChildNode('DocumentElement', TXMLDocumentElement);
|
|
|
|
|
|
|
|
ItemTag := 'DocumentElement';
|
|
|
|
ItemInterface := IXMLDocumentElement;
|
|
|
|
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLDocumentElements.Get_DocumentElement(Index: Integer): IXMLDocumentElement;
|
|
|
|
begin
|
|
|
|
Result := (List[Index] as IXMLDocumentElement);
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLDocumentElements.Add: IXMLDocumentElement;
|
|
|
|
begin
|
|
|
|
Result := (AddItem(-1) as IXMLDocumentElement);
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLDocumentElements.Insert(Index: Integer): IXMLDocumentElement;
|
|
|
|
begin
|
|
|
|
Result := (AddItem(Index) as IXMLDocumentElement);
|
|
|
|
end;
|
|
|
|
|
2008-05-14 13:30:54 +00:00
|
|
|
function TXMLDocumentElement.GetSchema: WideString;
|
2008-04-25 10:34:16 +00:00
|
|
|
begin
|
2008-05-14 13:30:54 +00:00
|
|
|
Result := AttributeNodes['Schema'].Text;
|
2008-04-25 10:34:16 +00:00
|
|
|
end;
|
|
|
|
|
2008-05-14 13:30:54 +00:00
|
|
|
function TXMLDocumentElement.GetXPath: WideString;
|
2008-04-25 10:34:16 +00:00
|
|
|
begin
|
2008-05-14 13:30:54 +00:00
|
|
|
Result := AttributeNodes['XPath'].Text;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TXMLDocumentElement.SetSchema(const Value: WideString);
|
|
|
|
begin
|
|
|
|
SetAttribute('Schema', Value);
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TXMLDocumentElement.SetXPath(const Value: WideString);
|
|
|
|
begin
|
|
|
|
SetAttribute('XPath', Value);
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TXMLInterfaces.AfterConstruction;
|
|
|
|
begin
|
|
|
|
RegisterChildNode('InterfaceName', TXMLInterfaceName);
|
|
|
|
|
|
|
|
ItemTag := 'InterfaceName';
|
|
|
|
ItemInterface := IXMLInterfaceName;
|
|
|
|
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLInterfaces.Get_InterfaceName(Index: Integer): IXMLInterfaceName;
|
|
|
|
begin
|
|
|
|
Result := (List[Index] as IXMLInterfaceName);
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLInterfaces.Add: IXMLInterfaceName;
|
|
|
|
begin
|
|
|
|
Result := (AddItem(-1) as IXMLInterfaceName);
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLInterfaces.Insert(Index: Integer): IXMLInterfaceName;
|
|
|
|
begin
|
|
|
|
Result := (AddItem(Index) as IXMLInterfaceName);
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLInterfaceName.GetSchema: WideString;
|
|
|
|
begin
|
|
|
|
Result := AttributeNodes['Schema'].Text;
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLInterfaceName.GetXPath: WideString;
|
|
|
|
begin
|
|
|
|
Result := AttributeNodes['XPath'].Text;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TXMLInterfaceName.SetSchema(const Value: WideString);
|
|
|
|
begin
|
|
|
|
SetAttribute('Schema', Value);
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TXMLInterfaceName.SetXPath(const Value: WideString);
|
|
|
|
begin
|
|
|
|
SetAttribute('XPath', Value);
|
2008-04-25 10:34:16 +00:00
|
|
|
end;
|
|
|
|
|
2009-09-29 15:12:47 +00:00
|
|
|
procedure TXMLProperties.AfterConstruction;
|
|
|
|
begin
|
|
|
|
RegisterChildNode('PropertyName', TXMLPropertyName);
|
|
|
|
|
|
|
|
ItemTag := 'PropertyName';
|
|
|
|
ItemInterface := IXMLPropertyName;
|
|
|
|
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLProperties.Get_PropertyName(Index: Integer): IXMLPropertyName;
|
|
|
|
begin
|
|
|
|
Result := (List[Index] as IXMLPropertyName);
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLProperties.Add: IXMLPropertyName;
|
|
|
|
begin
|
|
|
|
Result := (AddItem(-1) as IXMLPropertyName);
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLProperties.Insert(Index: Integer): IXMLPropertyName;
|
|
|
|
begin
|
|
|
|
Result := (AddItem(Index) as IXMLPropertyName);
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLPropertyName.GetSchema: WideString;
|
|
|
|
begin
|
|
|
|
Result := AttributeNodes['Schema'].Text;
|
|
|
|
end;
|
|
|
|
|
|
|
|
function TXMLPropertyName.GetXPath: WideString;
|
|
|
|
begin
|
|
|
|
Result := AttributeNodes['XPath'].Text;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TXMLPropertyName.SetSchema(const Value: WideString);
|
|
|
|
begin
|
|
|
|
SetAttribute('Schema', Value);
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TXMLPropertyName.SetXPath(const Value: WideString);
|
|
|
|
begin
|
|
|
|
SetAttribute('XPath', Value);
|
|
|
|
end;
|
|
|
|
|
2008-04-22 13:36:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
end.
|