- XMLDoc := LoadXMLDocument(FileName);
- XMLNode := XMLDoc.DocumentElement;
-
- if XMLNode.NodeName = 'address' then begin
- for i := 0 to XMLNode.ChildNodes.Count - 1 do begin
- HistoryNode := XMLNode.ChildNodes[i];
- if HistoryNode.NodeName = 'history' then begin
- if FReadCount >= sl.Count then begin
- s := Trim(HistoryNode.Attributes['url']);
- if s <> '' then
- sl.Add(s);
- //sl.Add(HttpDecode(s));
- end;
- end;
- end;
- end;
+ XMLDoc := IXMLDocument.Create;
+ //XMLDoc := LoadXMLDocument(FileName);
+ LoadXMLDocument(FileName, XMLDoc);
+ try
+ XMLNode := XMLDoc.DocumentElement;
+
+ if XMLNode.NodeName = 'address' then begin
+ for i := 0 to XMLNode.ChildNodes.Count - 1 do begin
+ HistoryNode := XMLNode.ChildNodes[i];
+ if HistoryNode.NodeName = 'history' then begin
+ if FReadCount >= sl.Count then begin
+ s := Trim(HistoryNode.Attributes['url']);
+ if s <> '' then
+ sl.Add(s);
+ //sl.Add(HttpDecode(s));
+ end;
+ end;
+ end;
+ end;
+ finally
+ XMLDoc.Free;
+ end;