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;
|
||||
begin
|
||||
if ScopeObject.HasChildNodes() then begin
|
||||
{$IFDEF WST_DELPHI}
|
||||
Result := FilterList(ScopeObject.ChildNodes,ANodeName);
|
||||
{$ELSE}
|
||||
Result := FilterList(ScopeObject,ANodeName);
|
||||
{$ENDIF WST_DELPHI}
|
||||
end else begin
|
||||
Result := nil;
|
||||
end;
|
||||
|
@ -32,7 +32,8 @@ type
|
||||
procedure ReadXMLFile(out ADoc: TXMLDocument; const AFilename: String);overload;
|
||||
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
|
||||
uses XmlDoc;
|
||||
@ -172,6 +173,11 @@ begin
|
||||
Result := TDOMNodeSelectListImp.Create(ALIst,ANodeName);
|
||||
end;
|
||||
|
||||
function FilterList(const ANode : TDOMNode; const ANodeName : DOMString):IDOMNodeList;
|
||||
begin
|
||||
Result := FilterList(ANode.ChildNodes,ANodeName);
|
||||
end;
|
||||
|
||||
{ TDOMNodeSelectListImp }
|
||||
|
||||
constructor TDOMNodeSelectListImp.Create(
|
||||
|
Reference in New Issue
Block a user