You've already forked lazarus-ccr
Overload FilterList() to simplify TEmbeddedArrayStackItem.CreateList()
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@707 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -2136,11 +2136,7 @@ end;
|
|||||||
function TEmbeddedArrayStackItem.CreateList(const ANodeName: string): TDOMNodeList;
|
function TEmbeddedArrayStackItem.CreateList(const ANodeName: string): TDOMNodeList;
|
||||||
begin
|
begin
|
||||||
if ScopeObject.HasChildNodes() then begin
|
if ScopeObject.HasChildNodes() then begin
|
||||||
{$IFDEF WST_DELPHI}
|
|
||||||
Result := FilterList(ScopeObject.ChildNodes,ANodeName);
|
|
||||||
{$ELSE}
|
|
||||||
Result := FilterList(ScopeObject,ANodeName);
|
Result := FilterList(ScopeObject,ANodeName);
|
||||||
{$ENDIF WST_DELPHI}
|
|
||||||
end else begin
|
end else begin
|
||||||
Result := nil;
|
Result := nil;
|
||||||
end;
|
end;
|
||||||
|
@ -32,7 +32,8 @@ type
|
|||||||
procedure ReadXMLFile(out ADoc: TXMLDocument; const AFilename: String);overload;
|
procedure ReadXMLFile(out ADoc: TXMLDocument; const AFilename: String);overload;
|
||||||
function NodeToBuffer(ANode : TDOMNode):string ;
|
function NodeToBuffer(ANode : TDOMNode):string ;
|
||||||
|
|
||||||
function FilterList(const ALIst : IDOMNodeList; const ANodeName : widestring):IDOMNodeList ;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
function FilterList(const ALIst : IDOMNodeList; const ANodeName : DOMString):IDOMNodeList;overload;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
||||||
|
function FilterList(const ANode : TDOMNode; const ANodeName : DOMString):IDOMNodeList;overload;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
uses XmlDoc;
|
uses XmlDoc;
|
||||||
@ -172,6 +173,11 @@ begin
|
|||||||
Result := TDOMNodeSelectListImp.Create(ALIst,ANodeName);
|
Result := TDOMNodeSelectListImp.Create(ALIst,ANodeName);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function FilterList(const ANode : TDOMNode; const ANodeName : DOMString):IDOMNodeList;
|
||||||
|
begin
|
||||||
|
Result := FilterList(ANode.ChildNodes,ANodeName);
|
||||||
|
end;
|
||||||
|
|
||||||
{ TDOMNodeSelectListImp }
|
{ TDOMNodeSelectListImp }
|
||||||
|
|
||||||
constructor TDOMNodeSelectListImp.Create(
|
constructor TDOMNodeSelectListImp.Create(
|
||||||
|
Reference in New Issue
Block a user